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

8.4.4 The Operation Command Words<br />

The 8259A is reprogrammed during program execution by using the Operation Command<br />

Words. The Operation Command Words can be sent at any time after initialization of the 8259A<br />

module is complete. The three Operation Command Words (OCW1, OCW2 and OCW3) are addressed<br />

through a combination of the A1 (register address) line and the state of data bits D3 and<br />

D4 (see Table 8-1).<br />

Table 8-1. Operation Command Word Addressing<br />

Access Port Register A1 D4 D3<br />

SPICP1 OCW1 1 X X<br />

SPICP0 OCW2 0 0 0<br />

SPICP0 OCW3 0 0 1<br />

8.4.4.1 Masking Interrupts: OCW1<br />

OCW1 (Figure 8-17) is the Interrupt Mask Register. Setting a bit in the Interrupt Mask Register<br />

inhibits further interrupts from the corresponding IR line. For example, if the M3 bit is set, then<br />

the IR3 line cannot generate interrupts. Clearing a bit in the Interrupt Mask Register enables interrupts<br />

from the corresponding IR line.<br />

Note that the Interrupt Mask Register operates on the output of the Interrupt Request Register.<br />

The IR lines can still set the bits in the Interrupt Request Register, even though they are masked.<br />

An interrupt will be requested if a masked IR line sets its Interrupt Request bit and then is unmasked.<br />

The Interrupt Mask Register is read directly by read cycles with A1=1 (the MPICP1 and SPICP1<br />

Peripheral Control Block registers).<br />

8.4.4.2 EOI And Interrupt Priority: OCW2<br />

OCW2 (Figure 8-18) is used to set priority and execute EOI commands. The R (rotate), SL (specific<br />

level) and EOI (end-of-interrupt) bits comprise a three-bit instruction field. The instruction<br />

field is decoded as shown in Table 8-2.<br />

8-30

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

Saved successfully!

Ooh no, something went wrong!