EIOT UNIT 1 - Interrupt Handling
EIOT UNIT 1 - Interrupt Handling
Interrupt Handling
Interrupt Service Routine
Interrupt Service Routine (ISR) is a specialized
3
Six Interrupts of 8051
RESET
Timers 0 and Timer 1
INT0 and INT1
Serial Port
4
Interrupt Priorities of 8051
9
Level Triggered Interrupt
Level-Triggered Interrupt INTO and INT I pins are normally
high.
If a low-level signal is applied to them, it triggers the
interrupt.
The microcontroller stops whatever it is doing and jumps to
the interrupt vector table to service that interrupt.
The low-level signal at the INT pin must be removed before
the execution of the last instruction of the ISR, RETI .
Otherwise, another interrupt will be generated. This is
called a level-triggered or level-activated interrupt and is the
default mode upon reset
10
Level Triggered Interrupt
11
Edge Triggered Interrupt
To make INTO and INT I edge-triggered interrupts, we
must program the bits of the TCON register The TCON
register holds the IT0 and IT1 flag bits that determine
level- or edge-triggered mode of the hardware interrupt
ITO and IT I are bits D0 and D2 of TCON They are also
referred to asTCON.0 and TCON.2 since the TCON
register is bit-addressable
12
D1 and D3 of TCON determines whether level triggered
or edge triggered mode of interrupt. they are also
referred to as TCON.1 and TCON.3
13
14