Rainbow-electronics ATmega32L Instrukcja Użytkownika Strona 46

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 313
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 45
46
ATmega32(L)
2503C–AVR–10/02
Bit 0 – IVCE: Interrupt Vector Change Enable
The IVCE bit must be written to logic one to enable change of the IVSEL bit. IVCE is
cleared by hardware four cycles after it is written or when IVSEL is written. Setting the
IVCE bit will disable interrupts, as explained in the IVSEL description above. See Code
Example below.
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);
}
Przeglądanie stron 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 312 313

Komentarze do niniejszej Instrukcji

Brak uwag