8259 Icw

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

ialization Command Words: There are four Initialization

Command Words for the 8259A


that are selected with the help of
logic level of A0 pin.
When the 8259A is first powered
up, it must be sent ICW1, ICW2 and
ICW4.
If the 8259A is programmed in
cascade mode by ICW1, then we
also must program ICW3.
So, if a single 8259A is used in a
system ICW1, ICW2 and ICW4 must
be
programmed.
If cascade mode is used in a

ICW1:

To program this ICW for 8086 we place a logic 1 in bit IC4.


Bits D7, D6 , D5and D2 are dont care for microprocessor operation
and only apply to the 8259A when used with an 8-bit 8085
microprocessor.
This ICW selects single or cascade operation by programming the
SNGL bit. If cascade operation is selected, we must also program
ICW3.

ICW2:

Selects the vector number used with the interrupt request inputs.
For example, if we decide to program the 8259A so that it
functions at vector locations 08H-0FH, we place a 08H into this
command word.
Likewise, if we decide to program the 8259A for vectors 70H-77H,
we place a 70H in this ICW.

ICW3:

Is used only when ICW1 indicates that the system is operated in


cascade mode.
This ICW indicates where the slave is connected to the master.
For example, if we connected a slave to IR2, then to program ICW3
for this connection, in both master and slave, we place a 04H in
ICW3.
Suppose we have two slaves connected to a master using IR0 and

ICW4:

Is programmed for use with the 8088/8086.


This ICW is not programmed in a system that
functions with the 8085 microprocessors.
The rightmost bit must be logic 1 to select
operation with the 8086 microprocessor, and
the remaining bits are programmed as follows:

SNFM:
Selects the special fully nested mode of operation for the 8259A if logic
1 is placed in this bit. This allows the highest priority interrupt request from
a slave to be recognized by the master while it is processing another
interrupt from a slave. Normally, only one interrupt request is processed at
a time and others are ignored until the process is completed.

BUF and M/S:


Buffer and master slave are used together to select buffered operation
or non-buffered operation for the 8559A as a master or a slave.

AEOI:
Selects automatic or normal end of interrupt. The EOI commands of
OCW2 are used only if the AEOI mode is not selected by ICW4. If AEOI is
selected, the interrupt automatically resets the interrupt request bit and
does not modify priority. This is the preferred mod of operation for the
8259A and reduces the length of the interrupt service procedure.

Operation Command Words

OCW1:

Is used to set and read the interrupt mask register.


When a mask bit is set, it will turn off (mask) the
corresponding interrupt input. The mask register is
read when OCW1 is read.
Because the state of the mask bits is known when the
8259A is first initialized, OCW1 must be programmed

OCW2:

Is programmed only when the AEOI mod is not selected for the
8259A.
In this case, this OCW selects how the 8259A responds to an
interrupt.

Nonspecific End-of-Interrupt:
A command sent by the interrupt service procedure to signal the end of
the interrupt. The 8259A automatically determines which interrupt level
was active and resets the correct bit of the interrupt status register.
Resetting the status bit allows the interrupt to take action again or a lower
priority interrupt to take effect.
Specific End-of Interrupt:
A command that allows a specific interrupt request to be reset. The exact
position is determined with bits L2-L0 of OCW2.
Rotate-on-Nonspecific EOI:
A command that function exactly like the nonspecific end-of-interrupt
command except that it rotates interrupt priorities after resetting the
interrupt status register bit. The level reset by this command becomes the
lowest priority interrupt. For example, if IR4 was just serviced by this
command, it becomes the lowest priority interrupt and IR5 becomes the
highest priority.
Rotate-on-Automatic EOI:
A command that selects automatic EOI with rotating priority. This
command must be sent to the 8259A only once if this mode is desired. If
this mode must be turned off, use the clear command.
Rotate-on-Specific EOI:
Functions as the specific EOI, except that it selects rotating priority.

OCW3:

Selects the register to be read, the operation of the special mask


register, and the poll command.

If polling is selected, the P-bit must be set and then output to the
8259A. The next read operation would read the poll word. The
rightmost three bits of the poll word indicate the active interrupt
request with the highest priority.

The leftmost bit indicates whether there is an interrupt, and must

tatus Register: Three status registers are available in the


8259A:
Interrupt request register (IRR):
an 8-bit register that indicates which interrupt request inputs are
active.

In-service register (ISR):


an 8-bit register that contains the level of the interrupt being
serviced.

Interrupt mask register (IMR):


An 8-bit register that holds the interrupt mask bits and indicates
which interrupts are masked off.
Both the IRR and ISR are read by programming OCW3 and IMR is

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy