ATtiny40 Atmel Corporation, ATtiny40 Datasheet - Page 90

no-image

ATtiny40

Manufacturer Part Number
ATtiny40
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATtiny40

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ATtiny40-MMHR
Quantity:
6 000
12.9
90
Accessing Registers in 16-bit Mode
ATtiny40
Figure 12-6. Timer/Counter Timing Diagram, with Prescaler (f
Figure 12-7 on page 90
Figure 12-7. Timer/Counter Timing Diagram, Setting of OCF1x, with Prescaler (f
Figure 12-8
Figure 12-8. Timer/Counter Timing Diagram, CTC mode, with Prescaler (f
In 16-bit mode (the TCW1 bit is set to one) the TCNT1H/L and OCR1A/B or TCNT1L/H and
OCR1B/A are 16-bit registers that can be accessed by the AVR CPU via the 8-bit data bus. The
16-bit register must be byte accessed using two read or write operations. The 16-bit
Timer/Counter has a single 8-bit register for temporary storing of the high byte of the 16-bit
TCNTn
TCNTn
(clk
(clk
OCRnx
TCNTn
OCFnx
(clk
OCRnx
TOVn
(CTC)
OCFnx
clk
clk
clk
clk
clk
clk
I/O
I/O
PCK
I/O
Tn
I/O
Tn
PCK
Tn
/8)
/8)
/8)
shows the setting of OCF1A and the clearing of TCNT1 in CTC mode.
OCRnx - 1
MAX - 1
TOP - 1
shows the setting of OCF1A and OCF1B in Normal mode.
OCRnx
TOP
MAX
OCRnx Value
TOP
BOTTOM
clk_I/O
OCRnx + 1
BOTTOM
/8)
clk_I/O
/8)
BOTTOM + 1
BOTTOM + 1
clk_I/O
8263A–AVR–08/10
OCRnx + 2
/8)

Related parts for ATtiny40