
57
2545M–AVR–09/07
ATmega48/88/168
11. Interrupts
11.1 Overview
This section describes the specifics of the interrupt handling as performed in ATmega48/88/168.
For a general explanation of the AVR interrupt handling, refer to “Reset and Interrupt Handling”
on page 16.
The interrupt vectors in ATmega48, ATmega88 and ATmega168 are generally the same, with
the following differences:
• Each Interrupt Vector occupies two instruction words in ATmega168, and one instruction word
in ATmega48 and ATmega88.
• ATmega48 does not have a separate Boot Loader Section. In ATmega88 and ATmega168, the
Reset Vector is affected by the BOOTRST fuse, and the Interrupt Vector start address is
affected by the IVSEL bit in MCUCR.
11.2 Interrupt Vectors in ATmega48
Table 11-1. Reset and Interrupt Vectors in ATmega48
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