03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INTERRUPT CONTROL UNIT<br />

8.3.6.2 The Cascaded Interrupt Acknowledge Cycle: An Example<br />

The following example illustrates the interaction between master and slave 8259A modules in a<br />

cascaded configuration. We assume the following conditions:<br />

• The master 8259A module is programmed for cascade operation, a slave on IR7, default<br />

priority and edge-triggered mode.<br />

• The slave 8259A module is programmed for cascade operation, a slave address of 7, default<br />

priority and edge-triggered mode.<br />

• Both modules have just been initialized and no interrupts are pending.<br />

• All interrupts in both modules are unmasked.<br />

A typical cascade interrupt sequence takes place as follows:<br />

1. A low-to-high transition on IR2 of the slave 8259A module sets bit 2 in the Interrupt<br />

Request Register.<br />

2. The slave’s Priority Resolver checks whether any bits are set in the Interrupt Request<br />

Register that are of a higher priority than IR2. There are none.<br />

3. The slave’s Priority Resolver checks whether any bits are set in the In-Service Register<br />

that are of an equal or higher priority than IR2. There are none.<br />

4. At this point, the slave’s Priority Resolver has determined that IR2 has sufficient priority<br />

to request an interrupt. The slave interrupt request line (connected to the IR7 line on the<br />

master 8259A module) is asserted to signal an interrupt request.<br />

5. The low-to-high transition on the IR7 line signals to the master that the slave module is<br />

requesting an interrupt.<br />

6. The Priority Resolver within the master 8259A module checks whether the slave request<br />

is of sufficient priority to interrupt the CPU. (It is.) Note that, for the purposes of priority<br />

resolution, a cascaded input looks just like any other IR line.<br />

7. The master 8259A module asserts the interrupt request output line to the CPU.<br />

8. The CPU signals acknowledgment of the interrupt by initiating an interrupt acknowledge<br />

(INTA) cycle.<br />

9. On the first falling edge of INTA, the following actions occur:<br />

— The master 8259A module clears the IR7 Interrupt Request Bit and sets the IR7 In-<br />

Service Bit.<br />

— The master 8259A module sees that IR7 has a slave connected to it and drives the<br />

address of the slave (seven, in this case) on the CAS2:0 lines.<br />

— The slave 8259A module recognizes its address on the CAS2:0 bus. The slave 8259A<br />

module clears the IR2 Interrupt Request Bit and sets the IR2 In-Service bit.<br />

8-16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!