When the BOOTRST Fuse is unprogrammed, the Boot section size set to 2K bytes 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 ATmega88 is:
Address Labels Code
Comments
0x000
0x001
0x002
RESET: ldi
out
r16,high(RAMEND); Main program start
SPH,r16
; Set Stack Pointer to top of RAM
ldi
r16,low(RAMEND)
SPL,r16
0x003
0x004
out
sei
; Enable interrupts
0x005
;
<instr> xxx
.org 0xC01
0xC01
rjmp
rjmp
...
EXT_INT0
EXT_INT1
...
; IRQ0 Handler
0xC02
; IRQ1 Handler
...
;
0xC19
rjmp
SPM_RDY
; Store Program Memory Ready Handler
When the BOOTRST Fuse is programmed and the Boot section size set to 2K bytes, the most
typical and general program setup for the Reset and Interrupt Vector Addresses in ATmega88
is:
Address Labels Code
.org 0x001
Comments
0x001
0x002
...
rjmp
rjmp
...
EXT_INT0
EXT_INT1
...
; IRQ0 Handler
; IRQ1 Handler
;
0x019
;
rjmp
SPM_RDY
; Store Program Memory Ready Handler
.org 0xC00
0xC00
0xC01
0xC02
RESET: ldi
r16,high(RAMEND); Main program start
out
SPH,r16
; Set Stack Pointer to top of RAM
ldi
r16,low(RAMEND)
SPL,r16
0xC03
0xC04
out
sei
; Enable interrupts
0xC05
<instr> xxx
When the BOOTRST Fuse is programmed, the Boot section size set to 2K bytes 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 ATmega88 is:
Address Labels Code
Comments
;
.org 0xC00
0xC00
0xC01
0xC02
...
rjmp
rjmp
rjmp
...
RESET
; Reset handler
EXT_INT0
EXT_INT1
...
; IRQ0 Handler
; IRQ1 Handler
;
0xC19
;
rjmp
SPM_RDY
; Store Program Memory Ready Handler
0xC1A
RESET: ldi
r16,high(RAMEND); Main program start
58
ATmega48/88/168
2545E–AVR–02/05