Goseeko blog

What are 8051 Interrupts?

by Sonali

The interrupts are basically those instructions from the external devices which stops the current program execution and passes on the control to the external devices. The 8051 interrupts are INT0,  INT1,TO ,T1 , TI/RI. All these interrupts are controlled by IE (interrupt enable) register. 

Interrupt is a subroutine call that interrupts the microcontroller’s main operations or work and causes it to execute any other program, at the time of operation. It provides a mechanism to put on hold the ongoing operations, execute a subroutine and resume to another type of operation. 

8051 interrupts are of five types as mentioned below:

  • INTO
  • TFO
  • INT1
  • TF1
  • R1/T1

The interrupts (INT0) ̅ and (INT1) ̅ are called as external interrupts. The interrupts (INT0) ̅ and (INT1) ̅ are negative edge triggered.When these interrupts are activated, the corresponding flags are set except for serial interrupts.

When the processor branches to ISR the interrupt flags are cleared. 

Interrupt Enable (IE)Register

We use IE registers to enable or disable interrupts. We can achieve this by programming this register accordingly. It is a SFR which has an address as A8H. This byte is bit addressable hence can be programmed by the user. Therefore there is specific meaning to every bit of the register.

Interrupt Priority (IP) Register

The five interrupts can be either one or two interrupt levels. The levels 1 and 0 are priority levels. Out of which  level 1 always indicates  Higher Priority and level 0 indicates lower priority. Then priority levels are in the IP register for each and every interrupt. It is SRF with address B8H.

External Interrupt

INT0 and INT1 are external interrupts.  The TCON register are for programming external interrupts to edge or level triggered. Hence, the TCON is Timer Control. TCON is another bit addressable SFR. Then the address of SFR is 88H.

Interested in learning about similar topics? Here are a few hand-picked blogs for you!

You may also like