You are on page 1of 1

8051 provides 5 sources of interrupt, INT0 and INT1 are the two external interrupts.

These can be edge triggered or level triggered, as program with bits IT0 and IT1 is Register TCON. These interrupts are processed internally by the flags IE0 and IE1. If the interrupts are programmed as edge sensitive, these flags are automatically cleared after the control is transferred to the respective vector. On the other hand if the interrupt are program as level sensitive, these flags are controlled by the external interrupt sources themselves. Both timers can be used in timer or counter mode. In counter mode it counts the pulses at T0 and T1 pin. In timer mode the oscillator clock is divided by a prescalar (1/32) and then given to the timer. So clock frequency for timer is 1/32th of the controller operating frequency. The timer is a UP counter and generate an interrupt when the count reaches FFFF H. The timer 0 and Timer 1 interrupt sources are generated by TF0 and TF1 bits of the register TCON; which are set; if a rollover takes place in their respective timer register except timer 0 in mode 3. The serial port interrupt is generated if alteast one of the (bits) two bits RI and TI is set Neither of the flag is cleared after the control is transferred to the service routine RI and TI flags need to be cleared using software. In addition to these 5 interrupts, 8051 also allows single step interrupt to be generate with the help of software. The different sources of interrupt program to have same level of priority, further follow a sequence of priority under that level as shown.

INTERRUPTS OF 8051

The All these interrupt are enabled using a special function register called Interrupt Enable Register (IE) and their priorities are program using a special function register called Interrupt Priority Register (IP).

You might also like