Interrupt (1)
Interrupt (1)
Interrupt
• An interrupt is the occurrence of a condition--an event --
that cause a temporary suspension of a program while the
event is serviced by another program (Interrupt Service
Routine ISR or Interrupt Handler).
• Interrupt-Driven System-- gives the illusion of doing many
things simultaneously, quick response to events, suitable for
real-time control application.
Program execution without interrupts
Two bits must be set to enable any interrupt: the individual enable bit
and global enable bit
SETB ET1
SETB EA
MOV IE,#10001000B
Interrupt Priority (IP, B8H)
• Bit Symbol Bit Address Description (1=high, 0=low priority)
• IP.7 - - Undefined
• IP.6 - - Undefined
• IP.5 PT2 BDH Priority for timer 2 interrupt (8052)
• IP.4 PS BCH Priority for serial port interrupt
• IP.3 PT1 BBH Priority for timer 1 interrupt
• IP.2 PX1 BAH Priority for external 1 interrupt
• IP.1 PT0 B9H Priority for timer 0 interrupt
• IP.0 PX0 B8H Priority for external 0 interrupt