Datasheet

i
7766F–AVR–11/10
ATmega16/32U4
Table of Contents
1 Pin Configurations ................................................................................... 3
2 Overview ................................................................................................... 3
2.1Block Diagram ...........................................................................................................4
2.2Pin Descriptions ........................................................................................................5
3 About ......................................................................................................... 8
3.1Disclaimer ..................................................................................................................8
3.2Resources .................................................................................................................8
3.3Code Examples .........................................................................................................8
3.4Data Retention ..........................................................................................................8
4 AVR CPU Core .......................................................................................... 9
4.1Introduction ................................................................................................................9
4.2Architectural Overview ..............................................................................................9
4.3ALU – Arithmetic Logic Unit ....................................................................................10
4.4Status Register ........................................................................................................11
4.5General Purpose Register File ................................................................................12
4.6Stack Pointer ...........................................................................................................13
4.7Instruction Execution Timing ...................................................................................14
4.8Reset and Interrupt Handling ..................................................................................15
5 AVR ATmega16U4/ATmega32U4 Memories ........................................ 18
5.1In-System Reprogrammable Flash Program Memory .............................................18
5.2SRAM Data Memory ...............................................................................................19
5.3EEPROM Data Memory ..........................................................................................21
5.4I/O Memory ..............................................................................................................26
6 System Clock and Clock Options ......................................................... 27
6.1Clock Systems and their Distribution .......................................................................27
6.2Clock Sources .........................................................................................................28
6.3Low Power Crystal Oscillator ...................................................................................29
6.4Low Frequency Crystal Oscillator ............................................................................31
6.5Calibrated Internal RC Oscillator .............................................................................32
6.6External Clock .........................................................................................................33
6.7Clock Switch ............................................................................................................34
6.8Clock switch Algorithm ............................................................................................35
6.9Clock Output Buffer .................................................................................................37