MICRO CONTROLLER 8051 INTERRUPTS

MICRO CONTROLLER 8051 INTERRUPTS

interrupt are used wherever it is necessary for a program to respond as quickly as possible to external events.such an even might be the arrival of a measurement value that is to be processed as fast as possible.

Interrupt from various sources can occur at any time during the program execution , which makes their programming and debugging complex.

The interrupt capabilities of the 8051 family are briefly discussed below.External interrupt are applied via IC input pins INT0 ( pin-12) INT1 ( pin -13 ).

The user can select the interrupt mode whether transition sensitive or level sensitives.

Further interrupt sources are Timer flag 0 ad Timer Flag1 ( TF0 and TF1) , Receiver Interrupt (R1) and Transmitter Interrupt ( T1) .When an interrupt occurs, the processor executes a kind of LCALL instruction , which results in a jump to the address associated with the interrupt routine.Interrupt sources and associated addresses are below


The register associated with interrupt are

- Interrupt Enable register (IE) -A8H
-Interrupt Priority register (IP) -B8H
- Timer/Counter control register -88H

Interrupt can be enabled or disabled selectively by setting or resettings the appropriate bits in IE as shown below.

Symbol........ Position......... .......Function

EA ............... IE7 ..... .................Disables all interrupts if EA=0.
....................................................If EA =1, each interrupt source is individually enabled ....................................................or disabled by setting or or clearing its bit.

---.......... ...IE6 .......................... reserved.

ET2 ...........IE5 ...........................enabled or disables the timer 2 overflow or capture interrupt in .....................................................8052.

ES ...............IE4 ...........................enable or disables the serial port interrupt.
......................................................If ES =0, the serial port disabled.

ET1 .............IE3 .............................enables or disables the Timer 1 overflow interrupt.

EX1 ..............IE2 ............................enables or disables the External interrupt 1.

ET0 ...............IE1 ............................enables or disables the Timer 0 overflow interrupt.

EX0 ................IE0 ............................enables or disables the External interrupt 0

Labels: ,