48
ATmega8535(L)
2502K–AVR–10/06
AddressLabels
Code
Comments
0x000 RESET:
ldi
r16,high(RAMEND) ; Main program start
0x001
out
SPH,r16
; Set Stack Pointer to top of RAM
0x002
ldi
r16,low(RAMEND)
0x003
out
SPL,r16
0x004
sei
; Enable interrupts
0x005
<instr> xxx
;
.org 0xC01
0xC01
rjmp
EXT_INT0
; IRQ0 Handler
0xC02
rjmp
EXT_INT1
; IRQ1 Handler
...
....
..
;
0xC14
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 0x001
0x001
rjmp
EXT_INT0
; IRQ0 Handler
0x002
rjmp
EXT_INT1
; IRQ1 Handler
...
... .
..
;
0x014
rjmp
SPM_RDY
; Store Program Memory Ready Handler
;
.org 0xC00
0xC00 RESET:
ldi
r16,high(RAMEND) ; Main program start
0xC01
out
SPH,r16
; Set Stack Pointer to top of RAM
0xC02
ldi
r16,low(RAMEND)
0xC03
out
SPL,r16
0xC04
sei
; Enable interrupts
0xC05
<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:
AddressLabels
Code
Comments
.org 0xC00
0xC00
rjmp
RESET
; Reset handler
0xC01
rjmp
EXT_INT0
; IRQ0 Handler
0xC02
rjmp
EXT_INT1
; IRQ1 Handler
...
... .
..
;
0xC14
rjmp
SPM_RDY
; Store Program Memory Ready Handler
;
0xC15 RESET:
ldi
r16,high(RAMEND) ;Main program start
0xC16
out
SPH,r16
; Set Stack Pointer to top of RAM
0xC17
ldi
r16,low(RAMEND)
0xC18
out
SPL,r16
0xC19
sei
; Enable interrupts
0xC20
<instr> xxx
Содержание ATmega8535
Страница 314: ...314 ATmega8535 L 2502K AVR 10 06 ...
Страница 320: ...vi ATmega8535 L 2502K AVR 10 06 ...