8259 material
8259 material
8259 material
PROGRAMMABLE INTERRUPT
CONTROLLER
It prioritizes the interrupt requests (selects the highest priority request for service).
In response to the ̅̅̅̅̅̅̅, it issues a unique type number (vector) for each interrupt
request input. In addition, type numbers are programmable.
The 8259 can accept requests from the peripheral, determines priority of incoming
request, checks whether the incoming request has a higher priority value than the
level currently being serviced, and issues an interrupt signal to the
microprocessor.
It can resolve the priority of interrupt i.e. it does not require any external priority
resolver.
It can be operated in various priority modes such as fixed priority and rotating
priority modes.
PIN CONFIGURATION OF 8259 PIC
Block Diagram of 8259 PIC: -
Control Logic
This block has two pins: INT (interrupt) as an output, and ̅̅̅̅̅̅̅ (interrupt
acknowledge) as an input.
The INT is connected to the interrupt pin of the microprocessor.
Whenever a valid interrupt is asserted, this signal goes high. The ̅̅̅̅̅̅̅ is the
interrupt acknowledgement signal from the microprocessor.
The interrupt at the IR (Interrupt Request) lines are handled by interrupt request
register internally.
The Interrupt Request Register (IRR) is used to store all the interrupt levels which
are requesting service in it in order to serve them one-by-one on the priority basis.
In-service registers are used to store all the interrupt levels which are being
serviced.
Each bit of this register is set by the priority resolver and reset by the end of the
interrupt command word.
The microprocessor can read the contents of this register by issuing appropriate
command word.
Priority resolver determines the priorities of the bits set in the IRR. To make
decision, the priority resolver looks at the ISR. If the highest priority bit in the ISR
is set, then it ignores the new request.
If the priority resolver finds that the new interrupt has a higher priority than the
interrupt currently being serviced, then it will set the appropriate bit in the ISR
and send the INT signal to the microprocessor for the new interrupt request.
Cascade Buffer/Comparator
This functional block stores and compares the identification numbers (IDs) of all
8259s used in the system.
The associated three I/O pins CAS2-CAS0 are outputs when the 8259 is used as a
master and the inputs when the 8259 is used as a slave.
As a master, the 8259 sends the ID of the interrupting slave device onto the CAS2-
CAS0 lines. The slave thus selected will send its programmed subroutine address
onto the data bus during the next one or two consecutive ̅̅̅̅̅̅̅ pulses.
In buffered mode, it generates a̅̅̅̅ signal.
When just one 8259 is used in a system, the cascade lines (CAS0, CAS1, and
CAS2) can be left open.
CONTROL/COMMAND WORDS OF 8259
The 8259A accepts two types of command words generated by the CPU:
Initialization command words (ICWs) needed for various 8259A applications are given in
this flowchart form.
According to this flowchart, an ICW I and an ICW2 must be sent to any 8259A in the
system.
If the system has any slave 8259As (cascade mode), then an ICW3 must be sent to the
master, and a different ICW3 must be sent to the slave.
If the system is an 8086 or if we want to specify certain special conditions, then we have
to send an ICW4 to the master and to each slave.
These are the command words which command the 8259A to operate in various interrupt
modes. These modes are:
Fully nested mode
Rotating priority mode
Special mask mode
Polled mode
The OCWs can be written into the 8259A any time after initialization.