64
8272E–AVR–04/2013
ATmega164A/PA/324A/PA/644A/PA/1284/P
Notes:
1. Applies only to Atmel ATmega1284P.
When the BOOTRST Fuse is unprogrammed, the Boot section size set to 8K 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 is:
Address
Labels Code
Comments
0x00000
RESET: ldi
r16,high(RAMEND); Main program start
0x00001
out
SPH,r16
; Set Stack Pointer to top of RAM
0x00002
ldi
r16,low(RAMEND)
0x00003
out
SPL,r16
0x00004
sei
; Enable interrupts
0x00005
<instr>
xxx
;
.org 0x1F002
0x1F002
jmp
EXT_INT0
; IRQ0 Handler
0x1F004
jmp
EXT_INT1
; IRQ1 Handler
...
;
0x1FO36
jmp
SPM_RDY
; SPM Ready Handler
When the BOOTRST Fuse is programmed and the Boot section size set to 8K bytes, the most
typical and general program setup for the Reset and Interrupt Vector Addresses is:
Address
Labels Code
Comments
.org 0x0002
0x00002
jmp
EXT_INT0
; IRQ0 Handler
0x00004
jmp
EXT_INT1
; IRQ1 Handler
...
;
0x00036
jmp
SPM_RDY
; SPM Ready Handler
;
.org 0x1F000
0x1F000
RESET: ldi
r16,high(RAMEND); Main program start
0x1F001
out
SPH,r16
; Set Stack Pointer to top of RAM
0x1F002
ldi
r16,low(RAMEND)
0x1F003
out
SPL,r16
0x1F004
sei
; Enable interrupts
0x1F005
<instr>
xxx
When the BOOTRST Fuse is programmed, the Boot section size set to 8K 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 is:
Address
Labels Code
Comments
;
.org 0x1F000
0x1F000
jmp
RESET
; Reset handler
0x1F002
jmp
EXT_INT0
; IRQ0 Handler
0x1F004
jmp
EXT_INT1
; IRQ1 Handler