English
Language : 

ATMEGA8_08 Datasheet, PDF (48/308 Pages) ATMEL Corporation – 8-bit with 8K Bytes In-System Programmable Flash
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:
AddressLabels Code
Comments
$000
;
rjmp RESET
; Reset handler
$001 RESET:ldi r16,high(RAMEND); Main program start
$002
out SPH,r16
; Set Stack Pointer to top of RAM
$003
ldi r16,low(RAMEND)
$004
out SPL,r16
$005
sei
; Enable interrupts
$006
<instr> xxx
;
.org $c01
$c01
rjmp EXT_INT0
; IRQ0 Handler
$c02
rjmp EXT_INT1
; IRQ1 Handler
...
... ... ;
$c12
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:
AddressLabels Code
Comments
.org $001
$001
rjmp EXT_INT0
; IRQ0 Handler
$002
rjmp EXT_INT1
; IRQ1 Handler
...
... ...
;
$012
rjmp SPM_RDY
; Store Program Memory Ready Handler
;
.org $c00
$c00
;
rjmp RESET
; Reset handler
$c01 RESET:ldi r16,high(RAMEND); Main program start
$c02
out SPH,r16
; Set Stack Pointer to top of RAM
$c03
ldi r16,low(RAMEND)
$c04
out SPL,r16
$c05
sei
; Enable interrupts
$c06
<instr> xxx
48 ATmega8(L)
2486T–AVR–05/08