When the BOOTRST Fuse is unprogrammed, the Boot section size set to 2K bytes and
the IVSEL bit in the GICR 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
$000
$001
$002
$003
$004
$005
;
RESET:
ldi r16,high(RAMEND) ; Main program start
out SPH,r16
ldi r16,low(RAMEND)
out SPL,r16
sei
; Set stack pointer to top of RAM
; Enable interrupts
<instr> xxx
.org $1C02
$1C02
jmp EXT_INT0
jmp EXT_INT1
..
; IRQ0 Handler
$1C04
; IRQ1 Handler
...
....
;
$1C28
jmp 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 is:
Address Labels
.org $002
$002
Code
Comments
jmp EXT_INT0
jmp EXT_INT1
..
; IRQ0 Handler
$004
; IRQ1 Handler
...
$028
;
....
;
jmp SPM_RDY
; Store Program Memory Ready Handler
.org $1C00
$1C00
$1C01
$1C02
$1C03
$1C04
$1C05
RESET:
ldi r16,high(RAMEND) ; Main program start
out SPH,r16
ldi r16,low(RAMEND)
out SPL,r16
sei
; Set stack pointer to top of RAM
; Enable interrupts
<instr> xxx
When the BOOTRST Fuse is programmed, the Boot section size set to 2K bytes and the
IVSEL bit in the GICR 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 $1C00
$1C00
$1C02
jmp RESET
jmp EXT_INT0
; Reset handler
; IRQ0 Handler
$1C04
jmp EXT_INT1
..
; IRQ1 Handler
...
....
;
$1C28
;
jmp SPM_RDY
; Store Program Memory Ready Handler
$1C2A
$1C2B
$1C2C
$1C2D
$1C2E
$1C2F
RESET:
ldi r16,high(RAMEND) ; Main program start
out SPH,r16
ldi r16,low(RAMEND)
out SPL,r16
sei
; Set stack pointer to top of RAM
; Enable interrupts
<instr> xxx
44
ATmega16(L)
2466E–AVR–10/02