69
8271D–AVR–05/11
ATmega48A/PA/88A/PA/168A/PA/328/P
0x001A
jmp
TIM1_OVF
; Timer1 Overflow Handler
0x001C
jmp
TIM0_COMPA
; Timer0 Compare A Handler
0x001E
jmp
TIM0_COMPB
; Timer0 Compare B Handler
0x0020
jmp
TIM0_OVF
; Timer0 Overflow Handler
0x0022
jmp
SPI_STC
; SPI Transfer Complete Handler
0x0024
jmp
USART_RXC
; USART, RX Complete Handler
0x0026
jmp
USART_UDRE
; USART, UDR Empty Handler
0x0028
jmp
USART_TXC
; USART, TX Complete Handler
0x002A
jmp
ADC
; ADC Conversion Complete Handler
0x002C
jmp
EE_RDY
; EEPROM Ready Handler
0x002E
jmp
ANA_COMP
; Analog Comparator Handler
0x0030
jmp
TWI
; 2-wire Serial Interface Handler
0x0032
jmp
SPM_RDY
; Store Program Memory Ready Handler
;
0x0033RESET:
ldi
r16, high(RAMEND); Main program start
0x0034
out
SPH,r16
; Set Stack Pointer to top of RAM
0x0035
ldi r16,
low(RAMEND)
0x0036
out SPL,r16
0x0037
sei
; Enable interrupts
0x0038
<instr> xxx
...
... ... ...
When the BOOTRST Fuse is unprogrammed, the Boot section size set to 2Kbytes and the
IVSEL bit in the MCUCR Register is set before any interrupts are enabled, the most typical and
general program setup for the Reset and Interrupt Vector Addresses in ATmega328/328P is:
Address
Labels Code
Comments
0x0000
RESET: ldi
r16,high(RAMEND); Main program start
0x0001
out
SPH,r16
; Set Stack Pointer to top of RAM
0x0002
ldi
r16,low(RAMEND)
0x0003
out
SPL,r16
0x0004
sei
; Enable interrupts
0x0005
<instr> xxx
;
.org 0x3C02
0x3C02
jmp
EXT_INT0
; IRQ0 Handler
0x3C04
jmp
EXT_INT1
; IRQ1 Handler
...
...
...
;
0x3C32
jmp
SPM_RDY
; Store Program Memory Ready Handler
When the BOOTRST Fuse is programmed and the Boot section size set to 2Kbytes, the most
typical and general program setup for the Reset and Interrupt Vector Addresses in
ATmega328/328P is:
Address
Labels Code
Comments
.org 0x0002
0x0002
jmp
EXT_INT0
; IRQ0 Handler
0x0004
jmp
EXT_INT1
; IRQ1 Handler
...
...
...
;
0x0032
jmp
SPM_RDY
; Store Program Memory Ready Handler