Datasheet

55
ATmega8515(L)
2512G–AVR–03/05
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 RESET: ldi r16,high(RAMEND); Main program start
$001 out SPH,r16 ; Set Stack Pointer to top of RAM
$002 ldi r16,low(RAMEND)
$003 out SPL,r16
$004 sei ; Enable interrupts
$005 <instr> xxx
;
.org $C02
$C02 rjmp EXT_INT0 ; IRQ0 Handler
$C04 rjmp EXT_INT1 ; IRQ1 Handler
... .... .. ;
$C2A 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 is:
Address Labels Code Comments
.org $002
$001 rjmp EXT_INT0 ; IRQ0 Handler
$002 rjmp EXT_INT1 ; IRQ1 Handler
... .... .. ;
$010 rjmp SPM_RDY ; Store Program memory Ready
Handler
;
.org $C00
$C00 RESET: ldi r16,high(RAMEND); Main program start
$C01 out SPH,r16 ; Set Stack Pointer to top of RAM
$C02 ldi r16,low(RAMEND)
$C03 out SPL,r16
$C04 sei ; Enable interrupts
$C05 <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 $C00
$C00 rjmp RESET ; Reset handler
$C01 rjmp EXT_INT0 ; IRQ0 Handler
$C02 rjmp EXT_INT1 ; IRQ1 Handler
... .... .. ;
$C10 rjmp SPM_RDY ; Store Program memory Ready
Handler
;
$C11 RESET: ldi r16,high(RAMEND); Main program start