Open In App

Operating modes of 8259 PIC

Prerequisites: 8259 PIC
8259 PIC is designed for the 8085 and 8086 microprocessor’s series. 

Need For PIC in 8085 and 8086 :



Characteristics of 8259 :

Operating modes of 8259 :
The different modes of operation of 8259 can be programmed by altering the bits of  ICW or OCW commands of 8259.



Fully nested mode :

Special fully nested mode (SFNM) :
This mode is used by master 8259 in a cascaded mode. Its priority structure is fixed and is the same as fully nested mode (i.e. IR0 has the highest priority and IR7 has the lowest priority).

In a special fully nested mode, the master will only serve higher priority interrupt from a slave, whose another interrupt is currently in service.

Rotating priority modes :
There are two rotating priority modes –

1. Automatic rotation mode 

2. Specific Rotation Mode

Special mask mode (SMM) :

Poll mode :
Here the INT pin of 8259 is not used, so, 8259 cannot interrupt the µp. Instead, the µP will provide a poll command to 8259 using OCW3. In response, 8259 provides a poll word to the µP. The poll word indicates the highest priority interrupt which needs service from µP. Thereafter, the µP services the interrupt. 

Advantage : 
The µP’s program is not interrupted. It can be used when ISR is common for many interrupts. It can be used to increase the number of interrupts beyond 64(i.e. in case of a cascaded configuration).

Drawback
If the polling interval is long, then the interrupts will be serviced after a long period. If the polling interval is short, then the time may be wasted on unnecessary polls.

EOI – (End Of Interrupt) :
When the microprocessor acknowledges an interrupt request by sending the first INTA signal, the 8259 sets the corresponding bit in the In Service Register (ISR). This starts the service of the interrupt. 
When this bit in the ISR is cleared, then it is known as the end of interrupt (EOI).

EOI Modes:
1. Normal EOI Mode –
Here, an EOI command is compulsory. The EOI command is written by the programmer at the end of the ISR. It makes 8259 to reset the bit from ISR. Further EOI command is of two types :

2. Automatic EOI mode (AEOI) –
In this mode, the EOI command is not required. Instead, 8259 will itself clear the corresponding bit from ISR at the end of the 2nd INTA pulse.

Edge and level-triggered mode :
If the LTIM bit of ICW1 =0 then the edge-triggered interrupt mode is set, otherwise the interrupts are level triggered.

Reading 8259 Status :
The status of the registers can be read by this mode. Here, the OCW3 is used to read IRR and ISR and OCW1 is used to read IMR.

Buffered Mode :
8259 sends a buffer enabled signal on the SP’/ EN’ pin when data is placed on the data bus.

Article Tags :