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 />

The Interrupt Request Register bits feed into the Priority Resolver. The Priority Resolver decides<br />

which of the pending interrupt requests is the highest priority based on the programmed operating<br />

mode. The Priority Resolver controls the interrupt request line to the CPU. The Priority Resolver<br />

has a default priority scheme that places IR0 as the highest priority and IR7 as the lowest priority.<br />

The priority can be modified through software. (See “The Priority Resolver and Priority Resolution”<br />

on page 8-10.)<br />

When an interrupt is acknowledged, an In-Service Register bit is set for that specific interrupt<br />

source. In some operating modes, the Priority Resolver looks at the In-Service Register in order<br />

to make its decision. In Fully Nested Mode, for example, the Priority Resolver needs to know<br />

whether a higher-priority interrupt is already in service before it interrupts the CPU. An interrupt<br />

handler must explicitly clear the In-Service bit for its interrupt before returning control to the<br />

main task. (See “The In-Service Register” on page 8-12.)<br />

The Interrupt Mask Register contains one bit for each interrupt request (IR) line. The Interrupt<br />

Mask Register allows the selective disabling of individual interrupt request sources. (See “Masking<br />

Interrupts” on page 8-14.)<br />

An interrupt request line is also referred to as an interrupt level. For example, an interrupt on IR<br />

line 7 is also called a “level 7 interrupt.” Figure 8-4 shows a simplified logic diagram for the circuitry<br />

for one IR line (or priority cell).<br />

Multiple 8259A modules can be connected together to expand the interrupt processing capability<br />

beyond eight levels. (See “Cascading 8259As” on page 8-14.) The Cascade Buffer/Comparator<br />

is used only when the 8259A module is programmed for cascade mode. During an INTA cycle,<br />

the Cascade Buffer of the master 8259A drives the address of the slave 8259A module that is being<br />

acknowledged. Each slave 8259A module uses the Cascade Comparator to determine whether<br />

it is the addressed slave.<br />

8.3.1 A Typical Interrupt Sequence Using the 8259A Module<br />

The function of the 8259A module is best illustrated by an example. For this example we assume<br />

the simplest of 8259A module configurations: a single master with the default fixed priority and<br />

programmed for Fully Nested Mode. The initial conditions are as follows:<br />

• the 8259A has just been initialized<br />

• there are no pending interrupts<br />

• all interrupts are unmasked<br />

• the IR inputs are programmed as edge-sensitive lines<br />

8-6

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

Saved successfully!

Ooh no, something went wrong!