Professional Documents
Culture Documents
Interrupt Expanding HW Interrupt: Presented By: Dr. Syed Aqeel Haider
Interrupt Expanding HW Interrupt: Presented By: Dr. Syed Aqeel Haider
Interrupt Expanding HW Interrupt: Presented By: Dr. Syed Aqeel Haider
EXPANDING HW INTERRUPT
PRESENTED BY: DR. SYED AQEEL HAIDER
EXPANDING INTERRUPT STRUCTURE
8088/8086 microprocessor has a single INTR input for receiving interrupts from I/O devices.
If no technique is employed to multiplex interrupt signals coming from different I/O devices, only one interrupt
signal may be connected with INTR input of 8088/8086 microprocessor.
Following methods may be employed to expand hardware interrupt interface of 8088/8086 microprocessor:
Using the 74ALS244 Buffer
Daisy-chain Method
8259 Programmable Interrupt Controller
USING 74ALS244 BUFFER TO EXPAND INTERRUPT STRUCTURE
USING 74ALS244 BUFFER TO EXPAND INTERRUPT STRUCTURE
The modification shown in Figure 12–13 allows to accommodate up to seven additional interrupt inputs.
The only hardware change is the addition of an eight-input NAND gate, which provides the INTR signal to the
microprocessor when any of the IR inputs becomes active.
In case, only one IR input is active, interrupt vectors are listed in Table 12-1.
If two or more interrupt request inputs are simultaneously active, a new interrupt vector is generated. For
example, if IR0 and IR1 are both active, the interrupt vector generated is FCH (252). Priority is resolved at this
location.
If the input IR0 is to have the higher priority, the vector address for IR0 is stored at vector location FCh.
The entire top half of the vector table and its 128 interrupt vectors must be used to accommodate all possible
conditions of these seven interrupt request inputs. This seems wasteful, but in many dedicated applications it is a
cost-effective approach to interrupt expansion.
DAISY-CHAIN METHOD FOR INTERRUPT EXPANSION
PORT A – MODE 1 INPUT
Input
PORT A
Device
If ‘INTE A’ is set then IBF will be available at INTR
INTE STB
Bit 4 of Port C is to be set for INTE A = 1 A
PC4
(Strobe)
Hence, interrupt processed I/O is activated PC5 IBF
(Input Buffer Full)
Command Byte B:
For setting PC4 : 0 * * * 1 0 0 1 = 00001001 = 09h
PC3 INTR
(Interrupt Request)
PORT B – MODE 1 INPUT
Input
PORT B
Device
If ‘INTE B’ is set then IBF will be available at INTR
INTE STB
Bit 2 of Port C is to be set for INTE B = 1 B
PC2
(Strobe)
Hence, interrupt processed I/O is activated PC1 IBF
(Input Buffer Full)
Command Byte B:
For setting PC4 : 0 * * * 0 1 0 1 = 00000101 = 05h
PC0 INTR
(Interrupt Request)
PORT A – MODE 1 OUTPUT
Outpu
PORT A t
Device
If ‘INTE A’ is set then OBF will be available at INTR
INTE ACK
Bit 6 of Port C is to be set for INTE A = 1 A
PC6
(Acknowledgement)
Hence, interrupt processed I/O is activated PC7 OBF
(Output Buffer Full)
Command Byte B:
For setting PC4 : 0 * * * 1 1 0 1 = 00001101 = 0Dh
PC3 INTR
(Interrupt Request)
PORT B – MODE 1 OUTPUT
Outpu
PORT B t
Device
If ‘INTE B’ is set then OBF will be available at INTR
INTE ACK
Bit 2 of Port C is to be set for INTE A = 1 B
PC2
(Acknowledgement)
Hence, interrupt processed I/O is activated PC1 OBF
(Output Buffer Full)
Command Byte B:
For setting PC4 : 0 * * * 0 1 0 1 = 00000101 = 05h
PC0 INTR
(Interrupt Request)
DAISY-CHAIN METHOD FOR INTERRUPT EXPANSION
Expansion by means of a daisy-chained interrupt is in many ways better than using the 74ALS244 because it
requires only one interrupt vector.
The task of determining priority is left to the interrupt service procedure.
Setting priority for a daisy-chain does require additional software execution time, but in general this is a much
better approach to expanding the interrupt structure of the microprocessor.
Figure 12–14 illustrates a set of two 82C55 peripheral interfaces with their four INTR outputs daisy-chained and
connected to the single INTR input of the microprocessor. If any interrupt output becomes a logic 1, so does the
INTR input to the microprocessor causing an interrupt.
Example 12–7 illustrates the interrupt service procedure that responds to the daisy-chain interrupt request. The
procedure polls each 82C55 and each INTR output to decide which interrupt service procedure to utilize.
8259 PROGRAMMABLE INTERRUPT CONTROLLER
ICW2 Is IC4 = 0
? Yes
No
Is Yes
SNGL=
ICW4
1?
No
A0 D7 D6 D5 D4 D3 D2 D1 D0
0 A7 A6 A5 1 LTIM ADI SNGL IC4
A0 D7 D6 D5 D4 D3 D2 D1 D0
1 T7 T6 T5 T4 T3 * * *
A0 D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 SFNM BUF M/S AEOI µPM
Q: Consider a 8088 microprocessor based system where two 8259A PIC are connected in cascade mode. Master is
interfaced for the addresses 80h – 81h while slave is interfaced at address 88h – 89h. Write command words for
following:
Master device: Special Fully Nested Mode is selected, interrupt request inputs are edge triggered, automatic end
of interrupt is selected, buffered operation and interrupt vectors 60h – 67h are assigned to IR pins.
Slave device: Special Fully Nested Mode is selected, interrupt request inputs are level triggered, normal end of
interrupt is selected, connected at IR5 of master and interrupt vectors 68h – 6Fh are assigned to IR pins.
Solution:
Master device: Slave device:
ICW1: * * * 1 0 * 0 1 = 0 0 0 1 0 0 0 1 = 11h ICW1: * * * 1 1 * 0 1 = 0 0 0 1 1 0 0 1 = 19h
MOV AL , 11h MOV AL , 19h
OUT 80h , AL ; A0 = 0 required OUT 88h , AL ; A0 = 0 required
EXAMPLE FOR INITIALIZATION OF 8259A PIC
A0 D7 D6 D5 D4 D3 D2 D1 D0
1 0
T7
S7 0
T6
S6 0
T5
S5 0
T4
SFNM
S4 0
T3
BUF
S3 ID2
*
M/S
S2 ID1
*
AEOI
S1 ID0
*
µPM
S0