ATtiny5 Atmel Corporation, ATtiny5 Datasheet - Page 74

no-image

ATtiny5

Manufacturer Part Number
ATtiny5
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATtiny5

Flash (kbytes)
0.5 Kbytes
Pin Count
6
Max. Operating Frequency
12 MHz
Cpu
8-bit AVR
# Of Touch Channels
1
Hardware Qtouch Acquisition
No
Max I/o Pins
4
Ext Interrupts
4
Usb Speed
No
Usb Interface
No
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
4
Adc Resolution (bits)
8
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
No
Crypto Engine
No
Sram (kbytes)
0.03
Self Program Memory
NO
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 125
I/o Supply Class
1.8 to 5.5
Operating Voltage (vcc)
1.8 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
1
Output Compare Channels
2
Input Capture Channels
1
Pwm Channels
2
32khz Rtc
No
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATtiny5-TS8R
Manufacturer:
Atmel
Quantity:
8 105
Part Number:
ATtiny5-TSHR
Manufacturer:
OMRON
Quantity:
1 500
Part Number:
ATtiny5-TSHR
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATtiny5-TSHR
Quantity:
12 000
Part Number:
ATtiny55V-10SSU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
11.10.1
11.11 Register Description
11.11.1
74
ATtiny4/5/9/10
Reusing the Temporary High Byte Register
TCCR0A – Timer/Counter0 Control Register A
Note:
The code example requires that the r17:r16 register pair contains the value to be written to
TCNT0.
If writing to more than one 16-bit register where the high byte is the same for all registers written,
then the high byte only needs to be written once. However, note that the same rule of atomic
operation described previously also applies in this case.
• Bits 7:6 – COM0A1:0: Compare Output Mode for Channel A
• Bits 5:4 – COM0B1:0: Compare Output Mode for Channel B
The COM0A1:0 and COM0B1:0 control the behaviour of Output Compare pins OC0A and
OC0B, respectively. If one or both COM0A1:0 bits are written to one, the OC0A output overrides
the normal port functionality of the I/O pin it is connected to. Similarly, if one or both COM0B1:0
bit are written to one, the OC0B output overrides the normal port functionality of the I/O pin it is
connected to.
Note, however, that the Data Direction Register (DDR) bit corresponding to the OC0A or OC0B
pin must be set in order to enable the output driver.
Bit
0x2E
Read/Write
Initial Value
Assembly Code Example
TIM16_WriteTCNT0:
; Save global interrupt flag
in r18,SREG
; Disable interrupts
cli
; Set TCNT0 to r17:r16
out TCNT0H,r17
out TCNT0L,r16
; Restore global interrupt flag
out SREG,r18
ret
See
“Code Examples” on page
COM0A1
R/W
7
0
COM0A0
R/W
6
0
COM0B1
R/W
5
0
5.
COM0B0
R/W
4
0
R
3
0
R
2
0
WGM01
R/W
1
0
WGM00
R/W
0
0
8127E–AVR–11/11
TCCR0A

Related parts for ATtiny5