How many interrupt priority levels are there in the MCS 51 microcontroller?
In general, there are 4 interrupt priority levels in each MCS 51 microcontroller. Each interrupt source can be programmed to one of four priority levels, by setting or clearing the bits in the Interrupt Priority and Interrupt Priority High registers. A low-priority interrupt can itself be interrupted by a higher priority interrupt, but not by another interrupt of the same priority. The highest priority interrupt cannot be interrupted by another interrupt source. If two or more requests of different priority levels are received simultaneously, the request of the higher priority level is serviced. If requests of the same priority level are received simultaneously, an internal polling sequence determines which request is serviced; thus within each priority level there is a second priority structure determined by a polling sequence. The MCS 51 Microcontroller Family User’s Manual describes these priorities in greater detail.