ATtiny804/806/807/1604/1606/
1607
tinyAVR
®
0-series
Introduction
The ATtiny804/806/807/1604/1606/1607 are members of the tinyAVR
®
0-series of microcontrollers, using the AVR
®
processor with hardware multiplier, running at up to 20 MHz, with 8/16 KB Flash, 512/1024 bytes of SRAM, and
128/256 bytes of EEPROM in a 14-, 20-, or 24-pin package. The tinyAVR
®
0-series uses the latest technologies
with a flexible, low-power architecture, including Event System, accurate analog features, and Core Independent
Peripherals (CIPs).
Attention:
This data sheet is valid for industrial qualified devices.
Features
•
CPU
– AVR
®
CPU
– Running at up to 20 MHz
– Single-cycle I/O access
– Two-level interrupt controller
– Two-cycle hardware multiplier
Memories
– 8/16 KB In-system self-programmable Flash memory
– 128/256 bytes EEPROM
– 512/1024 bytes SRAM
– Write/erase endurance:
• Flash 10,000 cycles
• EEPROM 100,000 cycles
– Data retention:
• 40 years at 55°C
System
– Power-on Reset (POR)
– Brown-out Detector (BOD)
– Clock options:
• 16/20 MHz low-power internal RC oscillator
• 32.768 kHz Ultra Low-Power (ULP) internal RC oscillator
• External clock input
– Single-Pin Unified Program and Debug Interface (UPDI)
– Three sleep modes:
• Idle with all peripherals running for immediate wake-up
• Standby
•
•
©
2021 Microchip Technology Inc.
Complete Datasheet
DS40002312A-page 1
ATtiny804/806/807/1604/1606/1607
– Configurable operation of selected peripherals
• Power-Down with full data retention
Peripherals
– One 16-bit Timer/Counter type A (TCA) with a dedicated period register and three compare channels
– One 16-bit Timer/Counter type B (TCB) with input capture
– One 16-bit Real-Time Counter (RTC) running from an external clock or internal RC oscillator
– Watchdog Timer (WDT) with Window mode, with a separate on-chip oscillator
– One USART with fractional baud rate generator, auto-baud, and start-of-frame detection
– One host/client Serial Peripheral Interface (SPI)
– One Two-Wire Interface (TWI) with dual address match
• Philips I
2
C compatible
• Standard mode (Sm, 100 kHz)
• Fast mode (Fm, 400 kHz)
• Fast mode plus (Fm+, 1 MHz)
– One Analog Comparator (AC) with a low propagation delay
– One 10-bit 115 ksps Analog-to-Digital Converter (ADC)
– Multiple voltage references (V
REF
):
• 0.55V
• 1.1V
• 1.5V
• 2.5V
• 4.3V
– Event System (EVSYS) for CPU independent and predictable inter-peripheral signaling
– Configurable Custom Logic (CCL) with two programmable look-up tables
– Automated CRC memory scan
– External interrupt on all general purpose pins
I/O and Packages:
– Up to 22 programmable I/O lines
– 14-pin SOIC150
– 20-pin SOIC300
– 20-pin VQFN 3x3 mm
– 24-pin VQFN 4x4 mm
Temperature Ranges:
– -40°C to 105°C
– -40°C to 125°C
Speed Grades:
– 0-5 MHz @ 1.8V – 5.5V
– 0-10 MHz @ 2.7V – 5.5V
– 0-20 MHz @ 4.5V – 5.5V
•
•
•
•
©
2021 Microchip Technology Inc.
Complete Datasheet
DS40002312A-page 2
ATtiny804/806/807/1604/1606/1607
Table of Contents
Introduction.....................................................................................................................................................1
Features......................................................................................................................................................... 1
1.
2.
Silicon Errata and Data Sheet Clarification Document............................................................................9
tinyAVR
®
0-series Overview..................................................................................................................10
2.1.
3.
4.
Configuration Summary..............................................................................................................10
Block Diagram.......................................................................................................................................12
Pinout.................................................................................................................................................... 13
4.1.
4.2.
4.3.
4.4.
14-Pin SOIC............................................................................................................................... 13
20-Pin SOIC............................................................................................................................... 14
20-Pin VQFN.............................................................................................................................. 15
24-Pin VQFN.............................................................................................................................. 16
5.
I/O Multiplexing and Considerations..................................................................................................... 17
5.1.
Multiplexed Signals.................................................................................................................... 17
6.
Memories.............................................................................................................................................. 18
6.1.
6.2.
6.3.
6.4.
6.5.
6.6.
6.7.
6.8.
6.9.
6.10.
Overview.................................................................................................................................... 18
Memory Map.............................................................................................................................. 19
In-System Reprogrammable Flash Program Memory................................................................19
SRAM Data Memory.................................................................................................................. 20
EEPROM Data Memory............................................................................................................. 20
User Row....................................................................................................................................20
Signature Bytes.......................................................................................................................... 20
I/O Memory.................................................................................................................................21
Memory Section Access from CPU and UPDI on Locked Device..............................................23
Configuration and User Fuses (FUSE).......................................................................................24
7.
Peripherals and Architecture.................................................................................................................42
7.1.
7.2.
7.3.
Peripheral Address Map.............................................................................................................42
Interrupt Vector Mapping............................................................................................................ 43
System Configuration (SYSCFG)...............................................................................................44
8.
AVR
®
CPU............................................................................................................................................ 47
8.1.
8.2.
8.3.
8.4.
8.5.
8.6.
8.7.
Features..................................................................................................................................... 47
Overview.................................................................................................................................... 47
Architecture................................................................................................................................ 47
Arithmetic Logic Unit (ALU)........................................................................................................ 49
Functional Description................................................................................................................49
Register Summary......................................................................................................................55
Register Description................................................................................................................... 55
9.
NVMCTRL - Nonvolatile Memory Controller......................................................................................... 59
9.1.
Features..................................................................................................................................... 59
©
2021 Microchip Technology Inc.
Complete Datasheet
DS40002312A-page 3
ATtiny804/806/807/1604/1606/1607
9.2.
9.3.
9.4.
9.5.
Overview.................................................................................................................................... 59
Functional Description................................................................................................................60
Register Summary......................................................................................................................66
Register Description................................................................................................................... 66
10. CLKCTRL - Clock Controller................................................................................................................. 74
10.1.
10.2.
10.3.
10.4.
10.5.
Features..................................................................................................................................... 74
Overview.................................................................................................................................... 74
Functional Description................................................................................................................76
Register Summary......................................................................................................................80
Register Description................................................................................................................... 80
11. SLPCTRL - Sleep Controller................................................................................................................. 89
11.1.
11.2.
11.3.
11.4.
11.5.
Features..................................................................................................................................... 89
Overview.................................................................................................................................... 89
Functional Description................................................................................................................89
Register Summary......................................................................................................................93
Register Description................................................................................................................... 93
12. RSTCTRL - Reset Controller................................................................................................................ 95
12.1.
12.2.
12.3.
12.4.
12.5.
Features..................................................................................................................................... 95
Overview.................................................................................................................................... 95
Functional Description................................................................................................................96
Register Summary....................................................................................................................100
Register Description................................................................................................................. 100
13. CPUINT - CPU Interrupt Controller..................................................................................................... 103
13.1.
13.2.
13.3.
13.4.
13.5.
Features................................................................................................................................... 103
Overview.................................................................................................................................. 103
Functional Description..............................................................................................................104
Register Summary ...................................................................................................................109
Register Description................................................................................................................. 109
14. EVSYS - Event System....................................................................................................................... 114
14.1.
14.2.
14.3.
14.4.
14.5.
Features................................................................................................................................... 114
Overview...................................................................................................................................114
Functional Description.............................................................................................................. 116
Register Summary....................................................................................................................118
Register Description................................................................................................................. 118
15. PORTMUX - Port Multiplexer.............................................................................................................. 125
15.1. Overview.................................................................................................................................. 125
15.2. Register Summary....................................................................................................................126
15.3. Register Description................................................................................................................. 126
16. PORT - I/O Pin Configuration..............................................................................................................131
16.1. Features................................................................................................................................... 131
16.2. Overview.................................................................................................................................. 131
16.3. Functional Description..............................................................................................................133
©
2021 Microchip Technology Inc.
Complete Datasheet
DS40002312A-page 4
ATtiny804/806/807/1604/1606/1607
16.4.
16.5.
16.6.
16.7.
Register Summary - PORTx.....................................................................................................136
Register Description - PORTx.................................................................................................. 136
Register Summary - VPORTx.................................................................................................. 148
Register Description - VPORTx................................................................................................148
17. BOD - Brown-out Detector.................................................................................................................. 153
17.1.
17.2.
17.3.
17.4.
17.5.
Features................................................................................................................................... 153
Overview.................................................................................................................................. 153
Functional Description..............................................................................................................154
Register Summary....................................................................................................................156
Register Description................................................................................................................. 156
18. VREF - Voltage Reference..................................................................................................................163
18.1.
18.2.
18.3.
18.4.
18.5.
Features................................................................................................................................... 163
Overview.................................................................................................................................. 163
Functional Description..............................................................................................................163
Register Summary ...................................................................................................................164
Register Description................................................................................................................. 164
19. WDT - Watchdog Timer.......................................................................................................................167
19.1.
19.2.
19.3.
19.4.
19.5.
Features................................................................................................................................... 167
Overview.................................................................................................................................. 167
Functional Description..............................................................................................................168
Register Summary - WDT........................................................................................................ 171
Register Description................................................................................................................. 171
20. TCA - 16-bit Timer/Counter Type A.....................................................................................................174
20.1.
20.2.
20.3.
20.4.
20.5.
20.6.
20.7.
Features................................................................................................................................... 174
Overview.................................................................................................................................. 174
Functional Description..............................................................................................................176
Register Summary - Normal Mode...........................................................................................187
Register Description - Normal Mode........................................................................................ 187
Register Summary - Split Mode............................................................................................... 206
Register Description - Split Mode.............................................................................................206
21. TCB - 16-Bit Timer/Counter Type B.................................................................................................... 222
21.1.
21.2.
21.3.
21.4.
21.5.
Features................................................................................................................................... 222
Overview.................................................................................................................................. 222
Functional Description..............................................................................................................224
Register Summary....................................................................................................................232
Register Description................................................................................................................. 232
22. RTC - Real-Time Counter................................................................................................................... 243
22.1.
22.2.
22.3.
22.4.
22.5.
22.6.
Features................................................................................................................................... 243
Overview.................................................................................................................................. 243
Clocks.......................................................................................................................................244
RTC Functional Description..................................................................................................... 244
PIT Functional Description....................................................................................................... 245
Events...................................................................................................................................... 246
©
2021 Microchip Technology Inc.
Complete Datasheet
DS40002312A-page 5