Atmega16(l) – Rainbow Electronics ATmega64L User Manual

Page 46

Advertising
background image

46

ATmega16(L)

2466B–09/01

Assembly Code Example

Move_interrupts:

; Enable change of interrupt vectors

ldi

r16, (1<<IVCE)

out

GICR, r16

; Move interrupts to boot Flash section

ldi

r16, (1<<IVSEL)

out

GICR, r16

ret

C Code Example

void

Move_interrupts(void)

{

/* Enable change of interrupt vectors */

GICR = (1<<IVCE);

/* Move interrupts to boot Flash section */

GICR = (1<<IVSEL);

}

Advertising