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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INTERRUPT CONTROL UNIT<br />

Polling requires that the CPU check each peripheral device in the system periodically to see<br />

whether it requires servicing. It would not be unusual to poll a low-speed peripheral (a serial port,<br />

for instance) thousands of times before it required servicing. In most cases, the use of polling has<br />

a detrimental effect on system throughput. Any time used to check the peripherals is time spent<br />

away from the main processing tasks.<br />

Interrupts eliminate the need for polling by signalling the CPU that a peripheral device requires<br />

servicing. The CPU then stops executing the main task, saves its state and transfers execution to<br />

the peripheral-servicing code (the interrupt handler). At the end of the interrupt handler, the<br />

CPU’s original state is restored and execution continues at the point of interruption in the main<br />

task.<br />

The 80C186 Modular Core has a single maskable interrupt input. (See “Interrupts and Exception<br />

Handling” on page 2-39.) Expanding the interrupt capabilities of the CPU beyond that of a single<br />

source requires an interrupt controller. The controller acts like a filter between the multiple interrupt<br />

request inputs and the single interrupt request to the CPU. The interrupt controller decides<br />

which of the interrupt requests is the most important (has the highest priority) and presents that<br />

interrupt to the CPU. Upon receipt of an interrupt, the CPU begins execution of a handshaking<br />

sequence called the interrupt acknowledge cycle.<br />

The interrupt acknowledge (or INTA) cycle) consists of two locked back-to-back bus cycles that<br />

the CPU initiates upon receipt of an unmasked external interrupt. The INTA cycle (Figure 8-2)<br />

is a specialized read cycle during which the CPU fetches the interrupt vector type from the interrupt<br />

controller. Interrupt acknowledge cycle timings and waveforms are covered in detail in<br />

Chapter 3, “Bus Interface Unit.”<br />

INTA<br />

Data Bus<br />

Vector Type<br />

Valid<br />

A1228-0A<br />

Figure 8-2. Interrupt Acknowledge Cycle<br />

Once the CPU has the vector type, it executes the interrupt processing sequence:<br />

1. Saves a partial machine status by pushing the Processor Status Word onto the stack.<br />

2. Clears the Trap Flag bit and Interrupt Enable bit in the Processor Status Word. This<br />

prevents maskable interrupts or single-step exceptions from interrupting the processor<br />

during the interrupt service routine.<br />

3. Pushes the current CS and IP onto the stack.<br />

8-3

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

Saved successfully!

Ooh no, something went wrong!