Datasheet

Address Labels Code Comments
$c03 ldi r16,low(RAMENSPL,r
16D)
$c04 out SPL,r16
$c05 sei ; Enable
interrupts
$c06 <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
:. :. :.
$c12 rjmp SPM_RDY ; Store Program
Memory Ready
Handler
$c13 RESET: ldi r16,high(RAMEND) ; Main program
start
$c14 out SPH,r16 ; Set Stack
Pointer to top of
RAM
$c15 ldi r16,low(RAMEND)
$c16 out SPL,r16
$c17 sei ; Enable
interrupts
$c18 <instr> XXX
Related Links
BTLDR - Boot Loader Support – Read-While-Write Self-Programming
ATmega8A Boot Loader Parameters
16.1.1 Moving Interrupts Between Application and Boot Space
The General Interrupt Control Register controls the placement of the Interrupt Vector table.
AVR 8-Bit Microcontroller
Interrupts
© 2017 Microchip Technology Inc.
Datasheet Complete
40001974A-page 72