INTERRUPTS IN 8051

Page 2

Interrupt Priority Register

When 8051 microprocessor starts or reset the default priority to each interrupt are tabulated below. The priorities can be changed using Interrupt priority register in 8051. Priority 1 assigned to INT0 is highest priority whereas priority 5 assigned to Serial port(T1/R1) is lowest priority. The Lowest priority Interrupt are not serviced until 8051 microprocessor completes high priority interrupts. In case multiple interrupts arrive at same time, the 8051 will queue them according to their respective priority.

Interrupt Priority Register

Bit.7,6,5  – Reserved and not implemented

Bit 4 – PS: Serial Interrupt Priority Bit

1 = Assign high priority to serial interrupt.

0 = Assign low priority to serial interrupt.

Bit 3 – PT1: Timer1 Interrupt Priority Bit         

1 = Assign high priority to Timer1 interrupt.

0 = Assign low priority to Timer1 interrupt.

Bit 2 – PX1: External Interrupt 1 Priority Bit    

1 = Assign high priority to External1 interrupt.

0 = Assign low priority to External1 interrupt.

Bit 1 – PT0: Timer0 Interrupt Priority Bit         

1 = Assign high priority to Timer0 interrupt.

0 = Assign low priority to Timer0 interrupt.

Bit 0 – PX0: External0 Interrupt Priority Bit     

1 = Assign high priority to External0 interrupt.

0 = Assign low priority to External0 interrupt.

Interrupt Priority Table

Interrupt Priority Table

Types of external Interrupts:

There are two types of external Interrupts,

Edge Triggered :

Interrupts are triggered when signal is rising or falling is detected. 8051 uses falling edge triggered interrupt.

Level Triggered :

Interrupts are triggered when signal is on high level or low level is detected . 8051 uses Low level triggered interrupt.

To set interrupt as edge triggered or Level triggered, TCON register was given which allows us to set interrupt as edge triggered or level triggered interrupt in 8051.

Goto Page 1 Goto Page 3

Leave a Reply