ATmega169P
Table 10-2 on page 57 shows reset and Interrupt Vectors placement for the various combina-
tions of BOOTRST and IVSEL settings. If the program never enables an interrupt source, the
Interrupt Vectors are not used, and regular program code can be placed at these locations. This
is also the case if the Reset Vector is in the Application section while the Interrupt Vectors are in
the Boot section or vice versa.
Table 10-2. Reset and Interrupt Vectors Placement(1)
BOOTRST
IVSEL
Reset Address
0x0000
Interrupt Vectors Start Address
0x0002
1
1
0
0
0
1
0
1
0x0000
Boot Reset Address + 0x0002
0x0002
Boot Reset Address
Boot Reset Address
Boot Reset Address + 0x0002
Note:
1. The Boot Reset Address is shown in Table 25-6 on page 291. For the BOOTRST Fuse “1”
means unprogrammed while “0” means programmed.
The most typical and general program setup for the Reset and Interrupt Vector Addresses in
ATmega169P is:
Address Labels Code
Comments
0x0000
0x0002
0x0004
0x0006
0x0008
0x000A
0x000C
0x000E
0x0010
0x0012
0x0014
0x0016
0x0018
0x001A
0x001C
0x001E
0x0020
0x0022
0x0024
0x0026
0x0028
0x002A
0x002C
;
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
RESET
; Reset Handler
EXT_INT0
PCINT0
; IRQ0 Handler
; PCINT0 Handler
PCINT1
; PCINT0 Handler
TIM2_COMP
TIM2_OVF
TIM1_CAPT
TIM1_COMPA
TIM1_COMPB
TIM1_OVF
TIM0_COMP
TIM0_OVF
SPI_STC
; Timer2 Compare Handler
; Timer2 Overflow Handler
; Timer1 Capture Handler
; Timer1 CompareA Handler
; Timer1 CompareB Handler
; Timer1 Overflow Handler
; Timer0 Compare Handler
; Timer0 Overflow Handler
; SPI Transfer Complete Handler
; USART0 RX Complete Handler
; USART0,UDRn Empty Handler
; USART0 TX Complete Handler
; USI Start Condition Handler
; USI Overflow Handler
; Analog Comparator Handler
; ADC Conversion Complete Handler
; EEPROM Ready Handler
; SPM Ready Handler
USART_RXCn
USART_DRE
USART_TXCn
USI_STRT
USI_OVFL
ANA_COMP
ADC
EE_RDY
SPM_RDY
LCD_SOF
; LCD Start of Frame Handler
0x002E RESET: ldi
r16, high(RAMEND); Main program start
0x002F
0x0030
out
ldi
SPH,r16
Set Stack Pointer to top of RAM
r16, low(RAMEND)
57
8018A–AVR–03/06