59
8271D–AVR–05/11
ATmega48A/PA/88A/PA/168A/PA/328/P
12. Interrupts
T h i s s e c t i o n d e s c r i b e s t h e s p e c i f i c s o f t h e i n t e r r u p t h a n d l i n g a s p e r f o r m e d i n
ATmega48A/PA/88A/PA/168A/PA/328/P. For a general explanation of the AVR interrupt han-
dling, refer to
”Reset and Interrupt Handling” on page 15
.
The interrupt vectors in ATmega 48A/48PA, ATmega88A/88PA, ATmega168A/168PA and
ATmega328/328P are generally the same, with the following differences:
• Each Interrupt Vector occupies two instruction words in ATmega168A/168PA and
ATmega328/328P, and one instruction word in ATmega 48A/48PA and ATmega88A/88PA.
• ATmega 48A/48PA does not have a separate Boot Loader Section. In ATmega88A/88PA,
ATmega168A/168PA and ATmega328/328P, the Reset Vector is affected by the BOOTRST
fuse, and the Interrupt Vector start address is affected by the IVSEL bit in MCUCR.
12.1
Interrupt Vectors in ATmega48A and ATmega48PA
Table 12-1.
Reset and Interrupt Vectors in ATmega48A and ATmega48PA
Vector No.
Program Address
Source
Interrupt Definition
1
0x000
RESET
External Pin, Power-on Reset, Brown-out Reset and Watchdog System Reset
2
0x001
INT0
External Interrupt Request 0
3
0x002
INT1
External Interrupt Request 1
4
0x003
PCINT0
Pin Change Interrupt Request 0
5
0x004
PCINT1
Pin Change Interrupt Request 1
6
0x005
PCINT2
Pin Change Interrupt Request 2
7
0x006
WDT
Watchdog Time-out Interrupt
8
0x007
TIMER2 COMPA
Timer/Counter2 Compare Match A
9
0x008
TIMER2 COMPB
Timer/Counter2 Compare Match B
10
0x009
TIMER2 OVF
Timer/Counter2 Overflow
11
0x00A
TIMER1 CAPT
Timer/Counter1 Capture Event
12
0x00B
TIMER1 COMPA
Timer/Counter1 Compare Match A
13
0x00C
TIMER1 COMPB
Timer/Coutner1 Compare Match B
14
0x00D
TIMER1 OVF
Timer/Counter1 Overflow
15
0x00E
TIMER0 COMPA
Timer/Counter0 Compare Match A
16
0x00F
TIMER0 COMPB
Timer/Counter0 Compare Match B
17
0x010
TIMER0 OVF
Timer/Counter0 Overflow
18
0x011
SPI, STC
SPI Serial Transfer Complete
19
0x012
USART, RX
USART Rx Complete
20
0x013
USART, UDRE
USART, Data Register Empty
21
0x014
USART, TX
USART, Tx Complete
22
0x015
ADC
ADC Conversion Complete
23
0x016
EE READY
EEPROM Ready