Renesas Renasas Single-Chip Microcomputer SH7086 Bedienungsanleitung Seite 281

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 308
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 280
263
Chapter 5 Interrupt
Example 1:Using the NOP instruction to keep the program waiting until
the interrupt control register is modified
INT_SWITCH1:
FCLR I ; Disable interrupts.
AND.B #00h, 0055h ; Set the TA0IC register to 00
16
.
NOP ;
Four NOP instructions are required when using HOLD function.
NOP ; Refer to hardware manual about the number of NOP
; instruction
FSET I ; Enable interrupts.
Example 2:Using the dummy read to keep the FSET instruction waiting
INT_SWITCH2:
FCLR I ; Disable interrupts.
AND.B #00h, 0055h ; Set the TA0IC register to 0016.
MOV.W MEM, R0 ; Dummy read.
FSET I ; Enable interrupts.
Example 3:Using the POPC instruction to changing the I flag
INT_SWITCH3:
PUSHC FLG
FCLR I ; Disable interrupts.
AND.B #00h, 0055h ; Set the TA0IC register to 00
16
.
POPC FLG ; Enable interrupts.
Seitenansicht 280
1 2 ... 276 277 278 279 280 281 282 283 284 285 286 ... 307 308

Kommentare zu diesen Handbüchern

Keine Kommentare