Contents
Introduction
Features
1. Silicon Errata and Data Sheet Clarification Document
2. tinyAVR 1-series Overview
2.1. Configuration Summary
2.1.1. Peripheral Summary
3. Block Diagram
4. Pinout
4.1. 14-Pin SOIC
4.2. 20-Pin SOIC
4.3. 20-Pin VQFN
4.4. 24-Pin VQFN
5. I/O Multiplexing and Considerations
5.1. Multiplexed Signals
6. Memories
6.1. Overview
6.2. Memory Map
6.3. In-System Reprogrammable Flash Program Memory
6.4. SRAM Data Memory
6.5. EEPROM Data Memory
6.6. User Row
6.7. Signature Bytes
6.8. I/O Memory
6.8.1. Register Summary
6.8.2. Register Description
6.8.2.1. General Purpose I/O Register n
6.9. Memory Section Access from CPU and UPDI on Locked Device
6.10. Configuration and User Fuses (FUSE)
6.10.1. Signature Row Summary
6.10.2. Signature Row Description
6.10.2.1. Device ID n
6.10.2.2. Serial Number Byte n
6.10.2.3. Temperature Sensor Calibration n
6.10.2.4. OSC16 Error at 3V
6.10.2.5. OSC16 Error at 5V
6.10.2.6. OSC20 Error at 3V
6.10.2.7. OSC20 Error at 5V
6.10.3. Fuse Summary - FUSE
6.10.4. Fuse Description
6.10.4.1. Watchdog Configuration
6.10.4.2. BOD Configuration
6.10.4.3. Oscillator Configuration
6.10.4.4. Timer Counter Type D Configuration
6.10.4.5. System Configuration 0
6.10.4.6. System Configuration 1
6.10.4.7. Application Code End
6.10.4.8. Boot End
6.10.4.9. Lockbits
7. Peripherals and Architecture
7.1. Peripheral Address Map
7.2. Interrupt Vector Mapping
7.3. System Configuration (SYSCFG)
7.3.1. Register Summary
7.3.2. Register Description
7.3.2.1. Device Revision ID Register
8. AVR CPU
8.1. Features
8.2. Overview
8.3. Architecture
8.4. Arithmetic Logic Unit (ALU)
8.4.1. Hardware Multiplier
8.5. Functional Description
8.5.1. Program Flow
8.5.2. Instruction Execution Timing
8.5.3. Status Register
8.5.4. Stack and Stack Pointer
8.5.5. Register File
8.5.5.1. The X-, Y-, and Z-Registers
8.5.6. Accessing 16-bit Registers
8.5.6.1. Accessing 24-Bit Registers
8.5.7. Configuration Change Protection (CCP)
8.5.7.1. Sequence for Write Operation to Configuration Change Protected I/O Registers
8.5.7.2. Sequence for Execution of Self-Programming
8.5.8. On-Chip Debug Capabilities
8.6. Register Summary
8.7. Register Description
8.7.1. CCP
8.7.2. SP
8.7.3. SREG
9. NVMCTRL - Nonvolatile Memory Controller
9.1. Features
9.2. Overview
9.2.1. Block Diagram
9.3. Functional Description
9.3.1. Memory Organization
9.3.1.1. Flash
9.3.1.2. EEPROM
9.3.1.3. User Row
9.3.2. Memory Access
9.3.2.1. Read
9.3.2.2. Page Buffer Load
9.3.2.3. Programming
9.3.2.4. Commands
9.3.2.4.1. Write Page Command
9.3.2.4.2. Erase Page Command
9.3.2.4.3. Erase/Write Page Command
9.3.2.4.4. Page Buffer Clear Command
9.3.2.4.5. Chip Erase Command
9.3.2.4.6. EEPROM Erase Command
9.3.2.4.7. Write Fuse Command
9.3.2.5. Write Access after Reset
9.3.3. Preventing Flash/EEPROM Corruption
9.3.4. Interrupts
9.3.5. Sleep Mode Operation
9.3.6. Configuration Change Protection
9.4. Register Summary
9.5. Register Description
9.5.1. Control A
9.5.2. Control B
9.5.3. Status
9.5.4. Interrupt Control
9.5.5. Interrupt Flags
9.5.6. Data
9.5.7. Address
10. CLKCTRL - Clock Controller
10.1. Features
10.2. Overview
10.2.1. Block Diagram - CLKCTRL
10.2.2. Signal Description
10.3. Functional Description
10.3.1. Sleep Mode Operation
10.3.2. Main Clock Selection and Prescaler
10.3.3. Main Clock After Reset
10.3.4. Clock Sources
10.3.4.1. Internal Oscillators
10.3.4.1.1. 16/20 MHz Oscillator (OSC20M)
10.3.4.1.1.1. OSC20M Stored Frequency Error Compensation
10.3.4.1.2. 32.768 kHz Oscillator (OSCULP32K)
10.3.4.2. External Clock Sources
10.3.4.2.1. External Clock (EXTCLK)
10.3.4.2.2. 32.768 kHz Crystal Oscillator (XOSC32K)
10.3.5. Configuration Change Protection
10.4. Register Summary
10.5. Register Description
10.5.1. Main Clock Control A
10.5.2. Main Clock Control B
10.5.3. Main Clock Lock
10.5.4. Main Clock Status
10.5.5. 16/20 MHz Oscillator Control A
10.5.6. 16/20 MHz Oscillator Calibration A
10.5.7. 16/20 MHz Oscillator Calibration B
10.5.8. 32.768 kHz Oscillator Control A
10.5.9. 32.768 kHz Crystal Oscillator Control A
11. SLPCTRL - Sleep Controller
11.1. Features
11.2. Overview
11.2.1. Block Diagram
11.3. Functional Description
11.3.1. Initialization
11.3.2. Operation
11.3.2.1. Sleep Modes
11.3.2.2. Wake-up Time
11.3.3. Debug Operation
11.4. Register Summary
11.5. Register Description
11.5.1. Control A
12. RSTCTRL - Reset Controller
12.1. Features
12.2. Overview
12.2.1. Block Diagram
12.2.2. Signal Description
12.3. Functional Description
12.3.1. Initialization
12.3.2. Operation
12.3.2.1. Reset Sources
12.3.2.1.1. Power-on Reset (POR)
12.3.2.1.2. Brown-out Detector (BOD) Reset
12.3.2.1.3. External Reset
12.3.2.1.4. Watchdog Reset
12.3.2.1.5. Software Reset
12.3.2.1.6. Unified Program and Debug Interface (UPDI) Reset
12.3.2.1.7. Domains Affected By Reset
12.3.2.2. Reset Time
12.3.3. Sleep Mode Operation
12.3.4. Configuration Change Protection
12.4. Register Summary
12.5. Register Description
12.5.1. Reset Flag Register
12.5.2. Software Reset Register
13. CPUINT - CPU Interrupt Controller
13.1. Features
13.2. Overview
13.2.1. Block Diagram
13.3. Functional Description
13.3.1. Initialization
13.3.2. Operation
13.3.2.1. Enabling, Disabling and Resetting
13.3.2.2. Interrupt Vector Locations
13.3.2.3. Interrupt Response Time
13.3.2.4. Interrupt Priority
13.3.2.4.1. Non-Maskable Interrupts
13.3.2.4.2. High-Priority Interrupt
13.3.2.4.3. Normal-Priority Interrupts
13.3.2.4.3.1. Static Scheduling
13.3.2.4.3.2. Modified Static Scheduling
13.3.2.4.3.3. Round Robin Scheduling
13.3.2.5. Compact Vector Table
13.3.3. Debug Operation
13.3.4. Configuration Change Protection
13.4. Register Summary
13.5. Register Description
13.5.1. Control A
13.5.2. Status
13.5.3. Interrupt Priority Level 0
13.5.4. Interrupt Vector with Priority Level 1
14. EVSYS - Event System
14.1. Features
14.2. Overview
14.2.1. Block Diagram
14.2.2. Signal Description
14.2.3. System Dependencies
14.2.3.1. Clocks
14.2.3.2. I/O Lines
14.3. Functional Description
14.3.1. Initialization
14.3.2. Operation
14.3.2.1. Event User Multiplexer Setup
14.3.2.2. Event System Channel
14.3.2.3. Event Generators
14.3.2.4. Software Event
14.3.3. Interrupts
14.3.4. Sleep Mode Operation
14.3.5. Debug Operation
14.3.6. Synchronization
14.3.7. Configuration Change Protection
14.4. Register Summary
14.5. Register Description
14.5.1. Asynchronous Channel Strobe
14.5.2. Synchronous Channel Strobe
14.5.3. Asynchronous Channel n Generator Selection
14.5.4. Synchronous Channel n Generator Selection
14.5.5. Asynchronous User Channel n Input Selection
14.5.6. Synchronous User Channel n Input Selection
15. PORTMUX - Port Multiplexer
15.1. Overview
15.2. Register Summary
15.3. Register Description
15.3.1. Control A
15.3.2. Control B
15.3.3. Control C
15.3.4. Control D
16. PORT - I/O Pin Configuration
16.1. Features
16.2. Overview
16.2.1. Block Diagram
16.2.2. Signal Description
16.3. Functional Description
16.3.1. Initialization
16.3.2. Operation
16.3.2.1. Basic Functions
16.3.2.2. Pin Configuration
16.3.2.3. Virtual Ports
16.3.2.4. Peripheral Override
16.3.3. Interrupts
16.3.3.1. Asynchronous Sensing Pin Properties
16.3.4. Events
16.3.5. Sleep Mode Operation
16.3.6. Debug Operation
16.4. Register Summary - PORTx
16.5. Register Description - PORTx
16.5.1. Data Direction
16.5.2. Data Direction Set
16.5.3. Data Direction Clear
16.5.4. Data Direction Toggle
16.5.5. Output Value
16.5.6. Output Value Set
16.5.7. Output Value Clear
16.5.8. Output Value Toggle
16.5.9. Input Value
16.5.10. Interrupt Flags
16.5.11. Pin n Control
16.6. Register Summary - VPORTx
16.7. Register Description - VPORTx
16.7.1. Data Direction
16.7.2. Output Value
16.7.3. Input Value
16.7.4. Interrupt Flags
17. BOD - Brown-out Detector
17.1. Features
17.2. Overview
17.2.1. Block Diagram
17.3. Functional Description
17.3.1. Initialization
17.3.2. Interrupts
17.3.3. Sleep Mode Operation
17.3.4. Configuration Change Protection
17.4. Register Summary
17.5. Register Description
17.5.1. Control A
17.5.2. Control B
17.5.3. VLM Control A
17.5.4. Interrupt Control
17.5.5. VLM Interrupt Flags
17.5.6. VLM Status
18. VREF - Voltage Reference
18.1. Features
18.2. Overview
18.2.1. Block Diagram
18.3. Functional Description
18.3.1. Initialization
18.4. Register Summary
18.5. Register Description
18.5.1. Control A
18.5.2. Control B
19. WDT - Watchdog Timer
19.1. Features
19.2. Overview
19.2.1. Block Diagram
19.2.2. Signal Description
19.3. Functional Description
19.3.1. Initialization
19.3.2. Clocks
19.3.3. Operation
19.3.3.1. Normal Mode
19.3.3.2. Window Mode
19.3.3.3. Configuration Protection and Lock
19.3.4. Sleep Mode Operation
19.3.5. Debug Operation
19.3.6. Synchronization
19.3.7. Configuration Change Protection
19.4. Register Summary - WDT
19.5. Register Description
19.5.1. Control A
19.5.2. Status
20. TCA - 16-bit Timer/Counter Type A
20.1. Features
20.2. Overview
20.2.1. Block Diagram
20.2.2. Signal Description
20.3. Functional Description
20.3.1. Definitions
20.3.2. Initialization
20.3.3. Operation
20.3.3.1. Normal Operation
20.3.3.2. Double Buffering
20.3.3.3. Changing the Period
20.3.3.4. Compare Channel
20.3.3.4.1. Waveform Generation
20.3.3.4.2. Frequency (FRQ) Waveform Generation
20.3.3.4.3. Single-Slope PWM Generation
20.3.3.4.4. Dual-Slope PWM
20.3.3.4.5. Port Override for Waveform Generation
20.3.3.5. Timer/Counter Commands
20.3.3.6. Split Mode - Two 8-Bit Timer/Counters
20.3.4. Events
20.3.5. Interrupts
20.3.6. Sleep Mode Operation
20.4. Register Summary - Normal Mode
20.5. Register Description - Normal Mode
20.5.1. Control A - Normal Mode
20.5.2. Control B - Normal Mode
20.5.3. Control C - Normal Mode
20.5.4. Control D - Normal Mode
20.5.5. Control Register E Clear - Normal Mode
20.5.6. Control Register E Set - Normal Mode
20.5.7. Control Register F Clear
20.5.8. Control Register F Set
20.5.9. Event Control
20.5.10. Interrupt Control Register - Normal Mode
20.5.11. Interrupt Flag Register - Normal Mode
20.5.12. Debug Control Register - Normal Mode
20.5.13. Temporary Bits for 16-Bit Access
20.5.14. Counter Register - Normal Mode
20.5.15. Period Register - Normal Mode
20.5.16. Compare n Register - Normal Mode
20.5.17. Period Buffer Register
20.5.18. Compare n Buffer Register
20.6. Register Summary - Split Mode
20.7. Register Description - Split Mode
20.7.1. Control A - Split Mode
20.7.2. Control B - Split Mode
20.7.3. Control C - Split Mode
20.7.4. Control D - Split Mode
20.7.5. Control Register E Clear - Split Mode
20.7.6. Control Register E Set - Split Mode
20.7.7. Interrupt Control Register - Split Mode
20.7.8. Interrupt Flag Register - Split Mode
20.7.9. Debug Control Register - Split Mode
20.7.10. Low Byte Timer Counter Register - Split Mode
20.7.11. High Byte Timer Counter Register - Split Mode
20.7.12. Low Byte Timer Period Register - Split Mode
20.7.13. High Byte Period Register - Split Mode
20.7.14. Compare Register n For Low Byte Timer - Split Mode
20.7.15. High Byte Compare Register n - Split Mode
21. TCB - 16-Bit Timer/Counter Type B
21.1. Features
21.2. Overview
21.2.1. Block Diagram
21.2.2. Signal Description
21.3. Functional Description
21.3.1. Definitions
21.3.2. Initialization
21.3.3. Operation
21.3.3.1. Modes
21.3.3.1.1. Periodic Interrupt Mode
21.3.3.1.2. Time-Out Check Mode
21.3.3.1.3. Input Capture on Event Mode
21.3.3.1.4. Input Capture Frequency Measurement Mode
21.3.3.1.5. Input Capture Pulse-Width Measurement Mode
21.3.3.1.6. Input Capture Frequency and Pulse-Width Measurement Mode
21.3.3.1.7. Single-Shot Mode
21.3.3.1.8. 8-Bit PWM Mode
21.3.3.2. Output
21.3.3.3. Noise Canceler
21.3.3.4. Synchronized with Timer/Counter Type A
21.3.4. Events
21.3.5. Interrupts
21.3.6. Sleep Mode Operation
21.4. Register Summary
21.5. Register Description
21.5.1. Control A
21.5.2. Control B
21.5.3. Event Control
21.5.4. Interrupt Control
21.5.5. Interrupt Flags
21.5.6. Status
21.5.7. Debug Control
21.5.8. Temporary Value
21.5.9. Count
21.5.10. Capture/Compare
22. TCD - 12-Bit Timer/Counter Type D
22.1. Features
22.2. Overview
22.2.1. Block Diagram
22.2.2. Signal Description
22.3. Functional Description
22.3.1. Definitions
22.3.2. Initialization
22.3.3. Operation
22.3.3.1. Register Synchronization Categories
22.3.3.2. Waveform Generation Modes
22.3.3.2.1. One Ramp Mode
22.3.3.2.2. Two Ramp Mode
22.3.3.2.3. Four Ramp Mode
22.3.3.2.4. Dual Slope Mode
22.3.3.3. Disabling TCD
22.3.3.4. TCD Inputs
22.3.3.4.1. Input Blanking
22.3.3.4.2. Digital Filter
22.3.3.4.3. Asynchronous Event Detection
22.3.3.4.4. Software Commands
22.3.3.4.5. Input Modes
22.3.3.4.5.1. Input Modes Validity
22.3.3.4.5.2. Input Mode 0: Input Has No Action
22.3.3.4.5.3. Input Mode 1: Stop Output, Jump to Opposite Compare Cycle, and Wait
22.3.3.4.5.4. Input Mode 2: Stop Output, Execute Opposite Compare Cycle, and Wait
22.3.3.4.5.5. Input Mode 3: Stop Output, Execute Opposite Compare Cycle while Fault Active
22.3.3.4.5.6. Input Mode 4: Stop all Outputs, Maintain Frequency
22.3.3.4.5.7. Input Mode 5: Stop all Outputs, Execute Dead Time while Fault Active
22.3.3.4.5.8. Input Mode 6: Stop All Outputs, Jump to Next Compare Cycle, and Wait
22.3.3.4.5.9. Input Mode 7: Stop all Outputs, Wait for Software Action
22.3.3.4.5.10. Input Mode 8: Stop Output on Edge, Jump to Next Compare Cycle
22.3.3.4.5.11. Input Mode 9: Stop Output on Edge, Maintain Frequency
22.3.3.4.5.12. Input Mode 10: Stop Output at Level, Maintain Frequency
22.3.3.4.5.13. Input Mode Summary
22.3.3.5. Dithering
22.3.3.6. TCD Counter Capture
22.3.3.7. Output Control
22.3.4. Events
22.3.4.1. Programmable Output Events
22.3.5. Interrupts
22.3.6. Sleep Mode Operation
22.3.7. Debug Operation
22.3.8. Configuration Change Protection
22.4. Register Summary
22.5. Register Description
22.5.1. Control A
22.5.2. Control B
22.5.3. Control C
22.5.4. Control D
22.5.5. Control E
22.5.6. Event Control A
22.5.7. Event Control B
22.5.8. Interrupt Control
22.5.9. Interrupt Flags
22.5.10. Status
22.5.11. Input Control A
22.5.12. Input Control B
22.5.13. Fault Control
22.5.14. Delay Control
22.5.15. Delay Value
22.5.16. Dither Control
22.5.17. Dither Value
22.5.18. Debug Control
22.5.19. Capture A
22.5.20. Capture B
22.5.21. Compare Set A
22.5.22. Compare Set B
22.5.23. Compare Clear A
22.5.24. Compare Clear B
23. RTC - Real-Time Counter
23.1. Features
23.2. Overview
23.2.1. Block Diagram
23.3. Clocks
23.4. RTC Functional Description
23.4.1. Initialization
23.4.1.1. Configure the Clock CLK_RTC
23.4.1.2. Configure RTC
23.4.2. Operation - RTC
23.4.2.1. Enabling and Disabling
23.5. PIT Functional Description
23.5.1. Initialization
23.5.2. Operation - PIT
23.5.2.1. Enabling and Disabling
23.5.2.2. PIT Interrupt Timing
23.6. Events
23.7. Interrupts
23.8. Sleep Mode Operation
23.9. Synchronization
23.10. Debug Operation
23.11. Register Summary
23.12. Register Description
23.12.1. Control A
23.12.2. Status
23.12.3. Interrupt Control
23.12.4. Interrupt Flag
23.12.5. Temporary
23.12.6. Debug Control
23.12.7. Clock Selection
23.12.8. Count
23.12.9. Period
23.12.10. Compare
23.12.11. Periodic Interrupt Timer Control A
23.12.12. Periodic Interrupt Timer Status
23.12.13. PIT Interrupt Control
23.12.14. PIT Interrupt Flag
23.12.15. Periodic Interrupt Timer Debug Control
24. USART - Universal Synchronous and Asynchronous Receiver and Transmitter
24.1. Features
24.2. Overview
24.2.1. Block Diagram
24.2.2. Signal Description
24.3. Functional Description
24.3.1. Initialization
24.3.2. Operation
24.3.2.1. Frame Formats
24.3.2.2. Clock Generation
24.3.2.2.1. The Fractional Baud Rate Generator
24.3.2.3. Data Transmission
24.3.2.3.1. Disabling the Transmitter
24.3.2.4. Data Reception
24.3.2.4.1. Receiver Error Flags
24.3.2.4.2. Disabling the Receiver
24.3.2.4.3. Flushing the Receive Buffer
24.3.3. Communication Modes
24.3.3.1. Synchronous Operation
24.3.3.1.1. Clock Operation
24.3.3.1.2. External Clock Limitations
24.3.3.1.3. USART in Host SPI Mode
24.3.3.1.3.1. Frame Formats
24.3.3.1.3.2. Clock Generation
24.3.3.1.3.3. Data Transmission
24.3.3.1.3.4. Data Reception
24.3.3.1.3.5. USART in Host SPI Mode vs. SPI
24.3.3.2. Asynchronous Operation
24.3.3.2.1. Clock Recovery
24.3.3.2.2. Data Recovery
24.3.3.2.3. Error Tolerance
24.3.3.2.4. Double-Speed Operation
24.3.3.2.5. Auto-Baud
24.3.3.2.6. Half-Duplex Operation
24.3.3.2.6.1. One-Wire Mode
24.3.3.2.6.2. RS-485 Mode
24.3.3.2.7. IRCOM Mode of Operation
24.3.4. Additional Features
24.3.4.1. Parity
24.3.4.2. Start-of-Frame Detection
24.3.4.3. Multiprocessor Communication
24.3.4.3.1. Using Multiprocessor Communication
24.3.5. Events
24.3.6. Interrupts
24.4. Register Summary
24.5. Register Description
24.5.1. Receiver Data Register Low Byte
24.5.2. Receiver Data Register High Byte
24.5.3. Transmit Data Register Low Byte
24.5.4. Transmit Data Register High Byte
24.5.5. USART Status Register
24.5.6. Control A
24.5.7. Control B
24.5.8. Control C - Normal Mode
24.5.9. Control C - Host SPI Mode
24.5.10. Baud Register
24.5.11. Debug Control Register
24.5.12. IrDA Control Register
24.5.13. IRCOM Transmitter Pulse Length Control Register
24.5.14. IRCOM Receiver Pulse Length Control Register
25. SPI - Serial Peripheral Interface
25.1. Features
25.2. Overview
25.2.1. Block Diagram
25.2.2. Signal Description
25.3. Functional Description
25.3.1. Initialization
25.3.2. Operation
25.3.2.1. Host Mode Operation
25.3.2.1.1. Normal Mode
25.3.2.1.2. Buffer Mode
25.3.2.1.3. SS Pin Functionality in Host Mode - Multi-Host Support
25.3.2.2. Client Mode
25.3.2.2.1. Normal Mode
25.3.2.2.2. Buffer Mode
25.3.2.2.3. SS Pin Functionality in Client Mode
25.3.2.3. Data Modes
25.3.2.4. Events
25.3.2.5. Interrupts
25.4. Register Summary
25.5. Register Description
25.5.1. Control A
25.5.2. Control B
25.5.3. Interrupt Control
25.5.4. Interrupt Flags - Normal Mode
25.5.5. Interrupt Flags - Buffer Mode
25.5.6. Data
26. TWI - Two-Wire Interface
26.1. Features
26.2. Overview
26.2.1. Block Diagram
26.2.2. Signal Description
26.3. Functional Description
26.3.1. General TWI Bus Concepts
26.3.2. TWI Basic Operation
26.3.2.1. Initialization
26.3.2.1.1. Host Initialization
26.3.2.1.2. Client Initialization
26.3.2.2. TWI Host Operation
26.3.2.2.1. Clock Generation
26.3.2.2.2. TWI Bus State Logic
26.3.2.2.3. Transmitting Address Packets
26.3.2.2.3.1. Case M1: Address Packet Transmit Complete - Direction Bit Set to ‘0’
26.3.2.2.3.2. Case M2: Address Packet Transmit Complete - Direction Bit Set to ‘1’
26.3.2.2.3.3. Case M3: Address Packet Transmit Complete - Address not Acknowledged by Client
26.3.2.2.3.4. Case M4: Arbitration Lost or Bus Error
26.3.2.2.4. Transmitting Data Packets
26.3.2.2.5. Receiving Data Packets
26.3.2.3. TWI Client Operation
26.3.2.3.1. Receiving Address Packets
26.3.2.3.1.1. Case S1: Address Packet Accepted - Direction Bit Set to ‘0’
26.3.2.3.1.2. Case S2: Address Packet Accepted - Direction Bit Set to ‘1’
26.3.2.3.1.3. Case S3: Stop Condition Received
26.3.2.3.1.4. Case S4: Collision
26.3.2.3.2. Receiving Data Packets
26.3.2.3.3. Transmitting Data Packets
26.3.3. Additional Features
26.3.3.1. SMBus
26.3.3.2. Multi-Host
26.3.3.3. Smart Mode
26.3.3.4. Quick Command Mode
26.3.3.5. 10-bit Address
26.3.4. Interrupts
26.3.5. Sleep Mode Operation
26.3.6. Debug Operation
26.4. Register Summary
26.5. Register Description
26.5.1. Control A
26.5.2. Debug Control
26.5.3. Host Control A
26.5.4. Host Control B
26.5.5. Host Status
26.5.6. Host Baud Rate
26.5.7. Host Address
26.5.8. Host Data
26.5.9. Client Control A
26.5.10. Client Control B
26.5.11. Client Status
26.5.12. Client Address
26.5.13. Client Data
26.5.14. Client Address Mask
27. CRCSCAN - Cyclic Redundancy Check Memory Scan
27.1. Features
27.2. Overview
27.2.1. Block Diagram
27.3. Functional Description
27.3.1. Initialization
27.3.2. Operation
27.3.2.1. Checksum
27.3.3. Interrupts
27.3.4. Sleep Mode Operation
27.3.5. Debug Operation
27.4. Register Summary - CRCSCAN
27.5. Register Description
27.5.1. Control A
27.5.2. Control B
27.5.3. Status
28. CCL - Configurable Custom Logic
28.1. Features
28.2. Overview
28.2.1. Block Diagram
28.2.2. Signal Description
28.2.3. System Dependencies
28.2.3.1. Clocks
28.2.3.2. I/O Lines
28.2.3.3. Interrupts
28.2.3.4. Debug Operation
28.3. Functional Description
28.3.1. Initialization
28.3.2. Operation
28.3.2.1. Enabling, Disabling, and Resetting
28.3.2.2. Truth Table Logic
28.3.2.3. Truth Table Inputs Selection
28.3.2.4. Filter
28.3.2.5. Edge Detector
28.3.2.6. Sequencer Logic
28.3.2.7. Clock Source Settings
28.3.3. Events
28.3.4. Sleep Mode Operation
28.3.5. Configuration Change Protection
28.4. Register Summary
28.5. Register Description
28.5.1. Control A
28.5.2. Sequencer Control 0
28.5.3. LUT n Control A
28.5.4. LUT n Control B
28.5.5. LUT n Control C
28.5.6. TRUTHn
29. AC - Analog Comparator
29.1. Features
29.2. Overview
29.2.1. Block Diagram
29.2.2. Signal Description
29.2.3. System Dependencies
29.2.3.1. Clocks
29.2.3.2. I/O Lines and Connections
29.2.3.3. Interrupts
29.2.3.4. Events
29.2.3.5. Debug Operation
29.3. Functional Description
29.3.1. Initialization
29.3.2. Operation
29.3.2.1. Input Hysteresis
29.3.2.2. Input Sources
29.3.2.2.1. Pin Inputs
29.3.2.2.2. Internal Inputs
29.3.2.3. Low-Power Mode
29.3.3. Events
29.3.4. Interrupts
29.3.5. Sleep Mode Operation
29.3.6. Configuration Change Protection
29.4. Register Summary
29.5. Register Description
29.5.1. Control A
29.5.2. MUX Control A
29.5.3. Interrupt Control
29.5.4. Status
30. ADC - Analog-to-Digital Converter
30.1. Features
30.2. Overview
30.2.1. Block Diagram
30.2.2. Signal Description
30.3. Functional Description
30.3.1. Initialization
30.3.1.1. I/O Lines and Connections
30.3.2. Operation
30.3.2.1. Starting a Conversion
30.3.2.2. Clock Generation
30.3.2.3. Conversion Timing
30.3.2.4. Changing Channel or Reference Selection
30.3.2.4.1. ADC Input Channels
30.3.2.4.2. ADC Voltage Reference
30.3.2.4.3. Analog Input Circuitry
30.3.2.5. ADC Conversion Result
30.3.2.6. Temperature Measurement
30.3.2.7. Window Comparator Mode
30.3.2.8. PTC Operation
30.3.3. Events
30.3.4. Interrupts
30.3.5. Sleep Mode Operation
30.4. Register Summary - ADCn
30.5. Register Description
30.5.1. Control A
30.5.2. Control B
30.5.3. Control C
30.5.4. Control D
30.5.5. Control E
30.5.6. Sample Control
30.5.7. MUXPOS
30.5.8. Command
30.5.9. Event Control
30.5.10. Interrupt Control
30.5.11. Interrupt Flags
30.5.12. Debug Run
30.5.13. Temporary
30.5.14. Result
30.5.15. Window Comparator Low Threshold
30.5.16. Window Comparator High Threshold
30.5.17. Calibration
31. DAC - Digital-to-Analog Converter
31.1. Features
31.2. Overview
31.2.1. Block Diagram
31.2.2. Signal Description
31.2.3. System Dependencies
31.2.3.1. Clocks
31.2.3.2. I/O Lines and Connections
31.2.3.3. Events
31.2.3.4. Interrupts
31.2.3.5. Debug Operation
31.3. Functional Description
31.3.1. Initialization
31.3.2. Operation
31.3.2.1. Enabling, Disabling and Resetting
31.3.2.2. Starting a Conversion
31.3.2.3. DAC as Source For Internal Peripherals
31.3.3. Sleep Mode Operation
31.3.4. Configuration Change Protection
31.4. Register Summary
31.5. Register Description
31.5.1. Control A
31.5.2. DATA
32. PTC - Peripheral Touch Controller
32.1. Overview
32.2. Features
32.3. Block Diagram
32.4. Signal Description
32.5. System Dependencies
32.5.1. I/O Lines
32.5.1.1. Mutual Capacitance Sensor Arrangement
32.5.1.2. Self Capacitance Sensor Arrangement
32.5.2. Clocks
32.5.3. Analog-to-Digital Converter (ADC)
32.6. Functional Description
33. UPDI - Unified Program and Debug Interface
33.1. Features
33.2. Overview
33.2.1. Block Diagram
33.2.2. Clocks
33.2.3. Physical Layer
33.2.4. I/O Lines and Connections
33.3. Functional Description
33.3.1. Principle of Operation
33.3.1.1. UPDI UART
33.3.1.2. BREAK Character
33.3.1.2.1. BREAK in One-Wire Mode
33.3.1.3. SYNCH Character
33.3.1.3.1. SYNCH in One-Wire Mode
33.3.2. Operation
33.3.2.1. UPDI Enabling
33.3.2.1.1. One-Wire Enable
33.3.2.1.1.1. UPDI Enable with Fuse Override of RESET Pin
33.3.2.1.1.2. UPDI Enable with High-Voltage Override of RESET Pin
33.3.2.1.1.3. Output Enable Timer Protection for GPIO Configuration
33.3.2.2. UPDI Disabling
33.3.2.2.1. Disable During Start-up
33.3.2.2.1.1. Time-Out Disable
33.3.2.2.1.2. Incorrect SYNCH pattern
33.3.2.2.2. UPDI Regular Disable
33.3.2.3. UPDI Communication Error Handling
33.3.2.4. Direction Change
33.3.3. UPDI Instruction Set
33.3.3.1. LDS - Load Data from Data Space Using Direct Addressing
33.3.3.2. STS - Store Data to Data Space Using Direct Addressing
33.3.3.3. LD - Load Data from Data Space Using Indirect Addressing
33.3.3.4. ST - Store Data from UPDI to Data Space Using Indirect Addressing
33.3.3.5. LDCS - Load Data from Control and Status Register Space
33.3.3.6. STCS - Store Data to Control and Status Register Space
33.3.3.7. REPEAT - Set Instruction Repeat Counter
33.3.3.8. KEY - Set Activation Key or Send System Information Block
33.3.4. CRC Checking of Flash During Boot
33.3.5. System Clock Measurement with UPDI
33.3.6. Inter-Byte Delay
33.3.7. System Information Block
33.3.8. Enabling of Key Protected Interfaces
33.3.8.1. Chip Erase
33.3.8.2. NVM Programming
33.3.8.3. User Row Programming
33.3.9. Events
33.3.10. Sleep Mode Operation
33.4. Register Summary
33.5. Register Description
33.5.1. Status A
33.5.2. Status B
33.5.3. Control A
33.5.4. Control B
33.5.5. ASI Key Status
33.5.6. ASI Reset Request
33.5.7. ASI Control A
33.5.8. ASI System Control A
33.5.9. ASI System Status
33.5.10. ASI CRC Status
34. Instruction Set Summary
35. Conventions
35.1. Numerical Notation
35.2. Memory Size and Type
35.3. Frequency and Time
35.4. Registers and Bits
35.4.1. Addressing Registers from Header Files
35.5. ADC Parameter Definitions
36. Electrical Characteristics
36.1. Disclaimer
36.2. Absolute Maximum Ratings
36.3. General Operating Ratings
36.4. Power Consumption
36.5. Wake-Up Time
36.6. Peripherals Power Consumption
36.7. BOD and POR Characteristics
36.8. External Reset Characteristics
36.9. Oscillators and Clocks
36.10. I/O Pin Characteristics
36.11. TCD
36.12. USART
36.13. SPI
36.14. TWI
36.15. VREF
36.16. ADC
36.17. TEMPSENSE
36.18. DAC
36.19. AC
36.20. PTC
36.21. UPDI Timing
36.22. Programming Time
37. Typical Characteristics
37.1. Power Consumption
37.1.1. Supply Currents in Active Mode
37.1.2. Supply Currents in Idle Mode
37.1.3. Supply Currents in Standby Mode
37.1.4. Supply Currents in Power Down Mode
37.1.5. Power on Supply Currents
37.2. GPIO
37.2.1. GPIO Input Characteristics
37.2.2. GPIO Output Characteristics
37.2.3. GPIO Pull-Up Characteristics
37.3. VREF Characteristics
37.4. BOD Characteristics
37.4.1. BOD Current vs. VDD
37.4.2. BOD Threshold vs. Temperature
37.5. ADC Characteristics
37.6. TEMPSENSE Characteristics
37.7. AC Characteristics
37.8. OSC20M Characteristics
37.9. OSCULP32K Characteristics
37.10. TWI SDA Hold Timing
38. Ordering Information
38.1. Product Information
38.2. Product Identification System
39. Package Drawings
39.1. Online Package Drawings
39.2. 14-Pin SOIC
39.3. 20-Pin SOIC
39.4. 20-Pin VQFN
39.5. 24-Pin VQFN
39.6. Thermal Considerations
39.6.1. Thermal Resistance Data
39.6.2. Junction Temperature
40. Errata
40.1. Errata - ATtiny417/814/816/817
41. Data Sheet Revision History
41.1. Rev. A - 12/2020
41.2. Appendix - Obsolete Revision History
41.2.1. ATtiny212/412 - DS40001911
41.2.2. ATtiny214/414/814 - DS40001912
41.2.3. ATtiny416/816 - DS40001913
41.2.4. ATtiny417/817 - DS40001901
The Microchip Website
Product Change Notification Service
Customer Support
Product Identification System
Microchip Devices Code Protection Feature
Legal Notice
Trademarks
Quality Management System
Worldwide Sales and Service