English
Language : 

ATMEGA406_0607 Datasheet, PDF (54/263 Pages) ATMEL Corporation – 8-bit Microcontroller with 40K Bytes In-System Programmable Flash
0x4C2F
0x4C30
0x4C31
0x4C32
0x4C33
out
SPH,r16
; Set Stack Pointer to top of RAM
ldi
r16,low(RAMEND)
out
SPL,r16
sei
; Enable interrupts
<instr> xxx
11.2 Moving Interrupts Between Application and Boot Space
The General Interrupt Control Register controls the placement of the Interrupt Vector table.
Assembly Code Example
Move_interrupts:
; Enable change of Interrupt Vectors
ldi r16, (1<<IVCE)
out MCUCR, r16
; Move interrupts to Boot Flash section
ldi r16, (1<<IVSEL)
out MCUCR, r16
ret
C Code Example
void Move_interrupts(void)
{
/* Enable change of Interrupt Vectors */
MCUCR = (1<<IVCE);
/* Move interrupts to Boot Flash section */
MCUCR = (1<<IVSEL);
}
54 ATmega406
2548E–AVR–07/06