
53
ATmega8515(L)
2512A–AVR–04/02
When the BOOTRST Fuseis unprogrammed, the Boot section size set to 2Kbytes and
the IVSEL bit in the GICRRegister isset beforeany interrupts areenabled, themost
typical and generalprogram setupfor theReset andInterruptVector 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 Fuseisprogrammed and the Boot section size set to 2Kbytes, the
mosttypical and generalprogram setupfor theReset andInterruptVector 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 Fuseisprogrammed, the Boot section size set to 2Kbytes and the
IVSEL bit in the GICR Register isset beforeany interrupts are enabled, themosttypical
and generalprogram setupfor theReset andInterruptVector 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
$C12 out SPH,r16 ; Set stack pointer to top of RAM
$C13 ldi r16,low(RAMEND)
$C14 out SPL,r16
$C15 sei ; Enable interrupts
$C16 <instr> xxx
Kommentare zu diesen Handbüchern