ATtiny5 Atmel Corporation, ATtiny5 Datasheet - Page 58

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.5
58
Input Capture Unit
ATtiny4/5/9/10
The Timer/Counter incorporates an Input Capture unit that can capture external events and give
them a time-stamp indicating time of occurrence. The external signal indicating an event, or mul-
tiple events, can be applied via the ICP0 pin. The time-stamps can then be used to calculate
frequency, duty-cycle, and other features of the signal applied. Alternatively the time-stamps can
be used for creating a log of the events.
The Input Capture unit is illustrated by the block diagram shown in
elements of the block diagram that are not directly a part of the Input Capture unit are gray
shaded. The lower case “n” in register and bit names indicates the Timer/Counter number.
Figure 11-5. Input Capture Unit Block Diagram
When a change of the logic level (an event) occurs on the Input Capture pin (ICP0), alternatively
on the Analog Comparator output (ACO), and this change confirms to the setting of the edge
detector, a capture will be triggered. When a capture is triggered, the 16-bit value of the counter
(TCNT0) is written to the Input Capture Register (ICR0). The Input Capture Flag (ICF0) is set at
the same system clock as the TCNT0 value is copied into ICR0 Register. If enabled (ICIE0 = 1),
the Input Capture Flag generates an Input Capture interrupt. The ICF0 flag is automatically
cleared when the interrupt is executed. Alternatively the ICF0 flag can be cleared by software by
writing a logical one to its I/O bit location.
Reading the 16-bit value in the Input Capture Register (ICR0) is done by first reading the low
byte (ICR0L) and then the high byte (ICR0H). When the low byte is read the high byte is copied
into the high byte temporary register (TEMP). When the CPU reads the ICR0H I/O location it will
access the TEMP Register.
The ICR0 Register can only be written when using a Waveform Generation mode that utilizes
the ICR0 Register for defining the counter’s TOP value. In these cases the Waveform Genera-
ICPn
WRITE
ICRnH (8-bit)
TEMP (8-bit)
Comparator
Analog
ICRn (16-bit Register)
ACO*
ICRnL (8-bit)
ACIC*
DATA BUS
Canceler
Noise
ICNC
(8-bit)
TCNTnH (8-bit)
TCNTn (16-bit Counter)
Detector
ICES
Edge
Figure 11-5 on page
TCNTnL (8-bit)
8127E–AVR–11/11
ICFn (Int.Req.)
58. The

Related parts for ATtiny5