Datasheet
23
ATmega323(L)
1457E–11/01
Notes: 1. When the BOOTRST fuse is programmed, the device will jump to the Boot Loader
address at reset, see “Boot Loader Support” on page 172.
2. When the IVSEL bit in GICR is set, interrupt vectors will be moved to the start of the
boot Flash section. The address of each interrupt vector will then be address in this
table plus the start address of the boot Flash section.
Table 4 shows reset and interrupt vectors placement for the various combinations of
BOOTRST and IVSEL settings.
Note: The Boot Reset Address is shown in Table 59 on page 172
The most typical and general program setup for the Reset and Interrupt Vector
Addresses in ATmega323 is:
Address Labels Code Comments
$000 jmp RESET ; Reset Handler
$002 jmp EXT_INT0 ; IRQ0 Handler
$004 jmp EXT_INT1 ; IRQ1 Handler
$006 jmp EXT_INT2 ; IRQ2 Handler
$008 jmp TIM2_COMP ; Timer2 Compare Handler
$00a jmp TIM2_OVF ; Timer2 Overflow Handler
$00c jmp TIM1_CAPT ; Timer1 Capture Handler
$00e jmp TIM1_COMPA ; Timer1 CompareA Handler
$010 jmp TIM1_COMPB ; Timer1 CompareB Handler
$012 jmp TIM1_OVF ; Timer1 Overflow Handler
$014 jmp TIM0_COMP ; Timer0 Compare Handler
$016 jmp TIM0_OVF ; Timer0 Overflow Handler
$018 jmp SPI_STC; ; SPI Transfer Complete Handler
10 $012 TIMER1 OVF Timer/Counter1 Overflow
11 $014 TIMER0 COMP Timer/Counter0 Compare Match
12 $016 TIMER0 OVF Timer/Counter0 Overflow
13 $018 SPI, STC Serial Transfer Complete
14 $01A USART, RXC USART, Rx Complete
15 $01C USART, UDRE USART Data Register Empty
16 $01E USART, TXC USART, Tx Complete
17 $020 ADC ADC Conversion Complete
18 $022 EE_RDY EEPROM Ready
19 $024 ANA_COMP Analog Comparator
20 $026 TWSI 2-wire Serial Interface
Table 4. Reset and Interrupt Vectors Placement
BOOTRST IVSEL Reset address Interrupt Vectors Start Address
0 0 $0000 $0002
0 1 $0000 Boot Reset Address + $0002
1 0 Boot Reset Address $0002
1 1 Boot Reset Address Boot Reset Address + $0002
Table 3. Reset and Interrupt Vectors (Continued)
Vector No. Program Address
(2)
Source Interrupt Definition