8259 PIC : Intel's Prog. interrupt Controller

22
asawari 2012 8259 Programmable Interrupt Controller By By Asawari Dudwadkar Asawari Dudwadkar Dept. of Electronics Dept. of Electronics VESIT VESIT

description

8085 Architecture in Mumbai university sem 5 ETRX /EXTC Syllabus

Transcript of 8259 PIC : Intel's Prog. interrupt Controller

Page 1: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

8259 Programmable Interrupt Controller

By By Asawari Dudwadkar Asawari Dudwadkar

Dept. of Electronics Dept. of Electronics VESITVESIT

Page 2: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

8259 architecture

Page 3: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

8259 Architecture

IRR –[ Interupt request register] store all int levels requesting serviceISR – 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.

Page 4: 8259 PIC : Intel's Prog. interrupt Controller

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.

Page 5: 8259 PIC : Intel's Prog. interrupt Controller

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.

Page 6: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

Single 8259 connected to 8086

Page 7: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

A single 8259A connected with the 8086

Page 8: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

Master – Slave mode

Page 9: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

2, 8259 connected in master –Slave mode

Page 10: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

Programming 8259

Page 11: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

Initialization sequence

Page 12: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

Programming the 8259A 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 1 LTIM indicates if IRQ lines are positive edge-triggered or level-

triggered.

Page 13: 8259 PIC : Intel's Prog. interrupt Controller

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

Page 14: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

ICW 3

Page 15: 8259 PIC : Intel's Prog. interrupt Controller

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

Page 16: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

Operation Command word OCW

Page 17: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

oCW1 is used to read or set the interrupt mask register. If a bit is set, it will mask the corresponding interrupt input

Page 18: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

OCW2: Only programmed when the AEOI mode in ICW4 is 0.

Page 19: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

Ocw 2Non-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).

Page 20: 8259 PIC : Intel's Prog. interrupt Controller

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.

Page 21: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012

ISR update procedure with rotating

priority configured.

Page 22: 8259 PIC : Intel's Prog. interrupt Controller

asawari 2012asawari 2012