NEC PD75P402 Instrukcja Użytkownika Strona 148

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 195
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 147
137
CHAPTER 6. INTERRUPT FUNCTIONS
6.6 INTERRUPT APPLICATIONS
When the interrupt function is used, the following setting are first carried out in the main program.
The interrupt enable flag corresponding to the interrupt to be used is set to “1” (EI IE××× instruction).
If INT0 is used, the active edge is selected (IM0 setting).
The interrupt master enable flag (IME) is set to “1” (EI instruction).
Return from the interrupt service program is by means of an RETI instruction.
(1) Interrupt enabling/disabling
Reset
EI IE0
EI IECSI
EI
DI IE0
DI
INT0 & INTCSI enabled
INTCSI enabled
Interrupts disabled
Interrupts disabled
<Main Program>
All interrupts disabled by RESET input.
Interrupt enable flag set by EI IE××× instruction.
At this stage, all interrupts are still disabled.
Interrupt master enable flag set by EI instruction.
At this stage, INT0 & INTCSI are enabled.
Interrupt enable flag cleared by DI IE××× instruction; INT0 disabled.
All interrupts disabled by DI instruction.
4
Przeglądanie stron 147
1 2 ... 143 144 145 146 147 148 149 150 151 152 153 ... 194 195

Komentarze do niniejszej Instrukcji

Brak uwag