Rainbow-electronics ATmega128L Manual do Utilizador Página 59

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 331
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 58
59
ATmega128(L)
2467B09/01
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 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);
}
Vista de página 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 330 331

Comentários a estes Manuais

Sem comentários