Datasheet
i
ATmega640/1280/1281/2560/2561
2549K–AVR–01/07
Table of Contents Features................................................................................................ 1
Pin Configurations............................................................................... 2
Disclaimer ............................................................................................................. 4
Overview............................................................................................... 5
Block Diagram ...................................................................................................... 5
Comparison Between ATmega1281/2561 and ATmega640/1280/2560 .............. 7
Pin Descriptions.................................................................................................... 7
Resources ............................................................................................ 9
About Code Examples......................................................................... 9
AVR CPU Core ................................................................................... 10
Introduction......................................................................................................... 10
Architectural Overview........................................................................................ 10
ALU – Arithmetic Logic Unit................................................................................ 11
Status Register ................................................................................................... 11
General Purpose Register File ........................................................................... 13
Stack Pointer ...................................................................................................... 14
Instruction Execution Timing............................................................................... 16
Reset and Interrupt Handling.............................................................................. 17
AVR Memories ................................................................................... 19
In-System Reprogrammable Flash Program Memory ........................................ 19
SRAM Data Memory........................................................................................... 20
EEPROM Data Memory...................................................................................... 22
I/O Memory ......................................................................................................... 25
External Memory Interface.................................................................................. 26
Register Description ........................................................................................... 32
System Clock and Clock Options .................................................... 37
Overview............................................................................................................. 37
Clock Systems and their Distribution .................................................................. 38
Clock Sources..................................................................................................... 39
Low Power Crystal Oscillator.............................................................................. 40
Full Swing Crystal Oscillator............................................................................... 42
Low Frequency Crystal Oscillator ....................................................................... 44
Calibrated Internal RC Oscillator ........................................................................ 44
128 kHz Internal Oscillator.................................................................................. 45
External Clock..................................................................................................... 45
Clock Output Buffer ............................................................................................ 46
Timer/Counter Oscillator..................................................................................... 46
System Clock Prescaler...................................................................................... 47
Register Description ........................................................................................... 48