Manual

i
ATmega161(L)
1228CAVR08/02
Table of Contents
Features................................................................................................. 1
Disclaimer.............................................................................................. 1
Pin Configuration.................................................................................. 2
Description............................................................................................ 3
Block Diagram ...................................................................................................... 4
Pin Descriptions.................................................................................................... 5
Crystal Oscillator................................................................................................... 6
Architectural Overview......................................................................... 7
The General Purpose Register File .................................................................... 10
ALU Arithmetic Logic Unit................................................................................ 11
Self-programmable Flash Program Memory....................................................... 11
EEPROM Data Memory...................................................................................... 11
SRAM Data Memory........................................................................................... 12
Program and Data Addressing Modes................................................................ 13
Memory Access Times and Instruction Execution Timing .................................. 17
l/O Memory ......................................................................................................... 19
Reset and Interrupt Handling.............................................................................. 22
MCU Control Register MCUCR ....................................................................... 34
Sleep Modes....................................................................................................... 36
Timer/Counters ................................................................................... 38
Timer/Counter Prescalers................................................................................... 38
8-bit Timer/Counters T/C0 and T/C2 .................................................................. 40
Timer/Counter1................................................................................................... 49
Watchdog Timer.................................................................................. 58
EEPROM Read/Write Access............................................................. 60
Prevent EEPROM Corruption ............................................................................. 62
Serial Peripheral Interface – SPI........................................................ 63
SS Pin Functionality............................................................................................ 65
Data Modes ........................................................................................................ 65
UARTs.................................................................................................. 69
Data Transmission.............................................................................................. 69
Data Reception................................................................................................... 71
UART Control ..................................................................................................... 73
Baud Rate Generator.......................................................................................... 76
Double-speed Transmission ............................................................................... 78
Analog Comparator ............................................................................ 81