8259 PIC: Intel's Prog. Interrupt Controller
8259 PIC: Intel's Prog. Interrupt Controller
Asawari Dudwadkar
Dept. of Electronics VESIT
asawari 2012
8259 architecture
asawari 2012
8259 Architecture
IRR [ Interupt request register] store all int levels requesting service ISR In service register stores int levels being serviced. Priority resolver determines priority of bits set in IRR, highest priority bit selected & strobed into ISR during Int acknowledge.
IMR Int mask register- stores int lines to be masked.
asawari 2012
Pins of 8259
8259 adds 8 vectored priority encoded interrupts to the microprocessor. It can be expanded to 64 interrupt requests by using one master 8259A and 8 slave units.
asawari 2012
INT Connects to the INTR pin on the microprocessor. INTA Connects to the INTA pin on the microprocessor. A0 Selects different command words in the 8259A. CS Chip select - enables the 8259A SP/EN- Slave Program (1 for master, 0 for slave) / Enable Buffer (controls the data bus transreceivers when in buffered mode). CAS2-CAS0 - Used as outputs from the master to the slaves in cascaded systems.
asawari 2012
asawari 2012
asawari 2012
asawari 2012
asawari 2012
Programming 8259
asawari 2012
Initialization sequence
asawari 2012
Programmed by Initialization (ICWs) and Operation (OCWs) Command Words. There are 4 ICWs. At power-up, ICW1, ICW2 and ICW4 must be sent. If ICW1 indicates cascade mode, then ICW3 must also be sent.
ICW
asawari 2012
ICW 2
oThese bits determine the vector numbers used with the IRQ inputs. For example, if programmed to generate vectors 08H-0FH, 08H is placed into these bit positions. oA8 A15 interrupt vector address of 8085
asawari 2012
ICW 3
asawari 2012
ICW 4
oFully nested mode allows the highest-priority interrupt request from a slave to be recognized by the master while it is processing another interrupt from a slave.
oIf AEOI = 1, it indicates that an interrupt automatically resets the interrupt request bit, otherwise OCW2 is consulted for
asawari 2012
asawari 2012
asawari 2012
asawari 2012
Ocw 2
Non-specific
EOI: Here, the ISR sets this bit to indicate EOI. The 8259A automatically determines which interrupt was active and re-enables it and lower priority interrupts. Specific EOI: ISR resets a specific interrupt request given by L2-L0. Rotate commands cause priority to be rotated w.r.t. the current one being processed. Set priority: allows the setting of the lowest priority interrupt (L2-L0).
asawari 2012
Ocw 3
If polling is set, the next read operation will read the polled word. If the leftmost bit is set in the poll word, the rightmost 3 bits indicate the active interrupt request with highest priority.
asawari 2012
asawari 2012
asawari 2012