Rainbow-electronics ATmega128L Instrukcja Użytkownika Strona 15

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 331
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 14
15
ATmega128(L)
2467B09/01
Interrupt Response Time The interrupt execution response for all the enabled AVR interrupts is 4 clock cycles
minimum. After 4 clock cycles, the program vector address for the actual interrupt han-
dling routine is executed. During this 4-clock cycle period, the Program Counter is
pushed onto the Stack. The vector is normally a jump to the interrupt routine, and this
jump takes 3 clock cycles. If an interrupt occurs during execution of a multi-cycle instruc-
tion, this instruction is completed before the interrupt is served. If an interrupt occurs
when the MCU is in sleep mode, the interrupt execution response time is increased by 4
clock cycles. This increase comes in addition to the start-up time from the selected
sleep mode.
A return from an interrupt handling routine takes 4 clock cycles. During these 4-clock
cycles, the Program Counter (2 bytes) is popped back from the Stack, the Stack Pointer
is incremented by 2, and the I-bit in SREG is set.
Assembly Code Example
sei ; set global interrupt enable
sleep ; enter sleep, waiting for interrupt
; note: will enter sleep before any pending
; interrupt(s)
C Code Example
_SEI(); /* set global interrupt enable */
_SLEEP(); /* enter sleep, waiting for interrupt */
/* note: will enter sleep before any pending interrupt(s) */
Przeglądanie stron 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 330 331

Komentarze do niniejszej Instrukcji

Brak uwag