ATtiny416/816
AVR® Microcontroller with Core Independent Peripherals
and picoPower® Technology
Introduction
The ATtiny416/816 microcontrollers are using the high-performance low-power AVR RISC architecture,
and is capable of running at up to 20MHz, with up to 4/8KB Flash, 256/512bytes of SRAM and 128bytes
of EEPROM in a 20-pin package. The series uses the latest technologies with a flexible and low power
architecture including Event System and SleepWalking, accurate analog features and advanced
®
peripherals. Capacitive touch interfaces with driven shield are supported with the integrated QTouch
peripheral touch controller.
®
Features
•
CPU
®
– AVR 8-bit CPU
– Running at up to 20MHz
– Single Cycle I/O Access
– Two-level Interrupt Controller
– Two-cycle Hardware Multiplier
Memories
– 4/8KB In-system self-programmable Flash Memory
– 128B EEPROM
– 256/512B SRAM
System
– Power-on Reset (POR)
– Brown-out Detection (BOD)
– Clock Options:
• 16/20MHz Low Power Internal RC Oscillator
• 32.768kHz Ultra Low Power (ULP) Internal RC Oscillator
• 32.768kHz External Crystal Oscillator
• External Clock Input
Single Pin Unified Program Debug Interface (UPDI)
Three Sleep Modes:
• Idle with All Peripherals Running and Mode for Immediate Wake Up Time
• Standby
– Configurable Operation of Selected Peripherals
– SleepWalking Peripherals
• Power Down with Wake-up Functionality
•
•
–
–
©
2017 Microchip Technology Inc.
Datasheet Preliminary
DS40001913A-page 1
ATtiny416/816
•
Peripherals
– 6-channel Event System
– One 16-bit Timer/Counter Type A with Dedicated Period Register, Three Compare Channels
(TCA)
– One 16-bit Timer/Counter type B with Input Capture (TCB)
– One 12-bit Timer/Counter type D Optimized for Control Applications (TCD)
– One 16-bit Real Time Counter (RTC) Running from External Crystal or Internal RC Oscillator
– One USART with Fractional Baud Rate Generator, Auto-baud, and Start-of-frame Detection
– Master/Slave Serial Peripheral Interface (SPI)
–
Master/Slave TWI with Dual Address Match
• Standard Mode (Sm, 100kHz)
• Fast Mode (Fm, 400kHz)
• Fast Mode Plus (Fm+, 1MHz)
Configurable Custom Logic (CCL) with Two Programmable Lookup Tables (LUT)
Analog Comparator (AC) with Low Propagation Delay
10-bit 115ksps Analog to Digital Converter (ADC)
8-bit Digital to Analog Converter (DAC)
Five Selectable Internal Voltage References: 0.55V, 1.1V, 1.5V, 2.5V and 4.3V
–
–
–
–
–
–
–
–
•
•
•
Automated CRC Memory Scan
Watchdog Timer (WDT) with Window Mode, with Separate On-chip Oscillator
Peripheral Touch Controller (PTC)
(1)
• Capacitive Touch Buttons, Sliders and Wheels
• Wake-up on Touch
• Driven Shield for Improved Moisture and Noise Handling Performance
• Six Self-capacitance and Nine Mutual-capacitance Channels
– External Interrupt on All General Purpose Pins
I/O and Packages:
– 18 Programmable I/O Lines
– 20-pin VQFN 3x3 and SOIC300
Temperature Ranges:
– -40°C to 105°C
– -40°C to 125°C Temperature Graded Device Options Available
Speed Grades:
– 0-5MHz @ 1.8V – 5.5V
– 0-10MHz @ 2.7V – 5.5V
– 0-20MHz @ 4.5V – 5.5V
Note:
1. Only Available in Devices with 8KB Flash.
©
2017 Microchip Technology Inc.
Datasheet Preliminary
DS40001913A-page 2
Table of Contents
Introduction......................................................................................................................1
Features.......................................................................................................................... 1
1. tinyAVR 1-Series Overview....................................................................................10
1.1.
Configuration Summary..............................................................................................................11
®
2. Ordering Information................................................................................................12
2.1.
2.2.
ATtiny416................................................................................................................................... 12
ATtiny816................................................................................................................................... 12
3. Block Diagram......................................................................................................... 13
4. Pinout...................................................................................................................... 15
4.1.
4.2.
20-pin SOIC................................................................................................................................15
20-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.
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
FUSES - Configuration and User Fuses.................................................................................... 22
7. Peripherals and Architecture................................................................................... 33
7.1.
7.2.
7.3.
Peripheral Module Address Map................................................................................................ 33
Interrupt Vector Mapping............................................................................................................ 34
SYSCFG - System Configuration............................................................................................... 35
8. AVR CPU................................................................................................................. 37
8.1.
8.2.
8.3.
8.4.
8.5.
8.6.
8.7.
Features..................................................................................................................................... 37
Overview.................................................................................................................................... 37
Architecture................................................................................................................................ 37
ALU - Arithmetic Logic Unit........................................................................................................ 39
Functional Description................................................................................................................40
Register Summary - CPU...........................................................................................................45
Register Description................................................................................................................... 45
9. NVMCTRL - Non Volatile Memory Controller.......................................................... 48
©
2017 Microchip Technology Inc.
Datasheet Preliminary
DS40001913A-page 3
ATtiny416/816
9.1.
9.2.
9.3.
9.4.
9.5.
Features..................................................................................................................................... 48
Overview.................................................................................................................................... 48
Functional Description................................................................................................................49
Register Summary - NVMCTRL................................................................................................. 55
Register Description................................................................................................................... 55
10. CLKCTRL - Clock Controller................................................................................... 59
10.1.
10.2.
10.3.
10.4.
10.5.
Features..................................................................................................................................... 59
Overview.................................................................................................................................... 59
Functional Description................................................................................................................61
Register Summary - CLKCTRL.................................................................................................. 66
Register Description................................................................................................................... 66
11. SLPCTRL - Sleep Controller................................................................................... 73
11.1.
11.2.
11.3.
11.4.
11.5.
Features..................................................................................................................................... 73
Overview.................................................................................................................................... 73
Functional Description................................................................................................................74
Register Summary - SLPCTRL.................................................................................................. 77
Register Description................................................................................................................... 77
12. RSTCTRL - Reset Controller...................................................................................78
12.1. Features..................................................................................................................................... 78
12.2. Overview.................................................................................................................................... 78
12.3. Functional Description................................................................................................................79
12.4. Register Summary - RSTCTRL..................................................................................................82
12.5. Register Description................................................................................................................... 82
13. CPUINT - CPU Interrupt Controller......................................................................... 84
13.1.
13.2.
13.3.
13.4.
13.5.
Features..................................................................................................................................... 84
Overview.................................................................................................................................... 84
Functional Description................................................................................................................86
Register Summary - CPUINT..................................................................................................... 92
Register Description................................................................................................................... 92
14. EVSYS - Event System........................................................................................... 95
14.1.
14.2.
14.3.
14.4.
14.5.
Features..................................................................................................................................... 95
Overview.................................................................................................................................... 95
Functional Description................................................................................................................98
Register Summary - EVSYS.................................................................................................... 100
Register Description................................................................................................................. 100
15. PORTMUX - Port Multiplexer................................................................................ 106
15.1. Overview.................................................................................................................................. 106
15.2. Register Summary - PORTMUX.............................................................................................. 107
15.3. Register Description................................................................................................................. 107
16. PORT - I/O Pin Configuration................................................................................ 110
16.1. Features................................................................................................................................... 110
16.2. Overview...................................................................................................................................110
©
2017 Microchip Technology Inc.
Datasheet Preliminary
DS40001913A-page 4
ATtiny416/816
16.3.
16.4.
16.5.
16.6.
16.7.
Functional Description.............................................................................................................. 112
Register Summary - PORT.......................................................................................................116
Register Description - Ports......................................................................................................116
Register Summary - VPORT.................................................................................................... 122
Register Description - Virtual Ports.......................................................................................... 122
17. BOD - Brownout Detector......................................................................................124
17.1.
17.2.
17.3.
17.4.
17.5.
Features................................................................................................................................... 124
Overview.................................................................................................................................. 124
Functional Description..............................................................................................................126
Register Summary - BOD.........................................................................................................128
Register Description................................................................................................................. 128
18. VREF - Voltage Reference.................................................................................... 132
18.1.
18.2.
18.3.
18.4.
18.5.
Features................................................................................................................................... 132
Overview.................................................................................................................................. 132
Functional Description..............................................................................................................132
Register Summary - VREF.......................................................................................................134
Register Description................................................................................................................. 134
19. WDT - Watchdog Timer......................................................................................... 136
19.1. Features................................................................................................................................... 136
19.2. Overview.................................................................................................................................. 136
19.3. Functional Description..............................................................................................................138
19.4. Register Summary - WDT........................................................................................................ 142
19.5. Register Description................................................................................................................. 142
20. TCA - 16-bit Timer/Counter Type A....................................................................... 144
20.1.
20.2.
20.3.
20.4.
20.5.
20.6.
20.7.
Features................................................................................................................................... 144
Overview.................................................................................................................................. 144
Functional Description..............................................................................................................148
Register Summary - TCA in Normal Mode (CTRLD.SPLITM=0)............................................. 158
Register Description - Normal Mode........................................................................................ 159
Register Summary - TCA in Split Mode (CTRLD.SPLITM=1).................................................. 171
Register Description - Split Mode.............................................................................................171
21. TCB - 16-bit Timer/Counter Type B....................................................................... 180
21.1.
21.2.
21.3.
21.4.
21.5.
Features................................................................................................................................... 180
Overview.................................................................................................................................. 180
Functional Description..............................................................................................................183
Register Summary - TCB......................................................................................................... 191
Register Description................................................................................................................. 191
22. TCD - 12-bit Timer/Counter Type D.......................................................................198
22.1.
22.2.
22.3.
22.4.
22.5.
Features................................................................................................................................... 198
Overview.................................................................................................................................. 198
Functional Description..............................................................................................................202
Register Summary - TCD......................................................................................................... 224
Register Description................................................................................................................. 225
©
2017 Microchip Technology Inc.
Datasheet Preliminary
DS40001913A-page 5