Zilog Z16C30 User Manual
Page 149

7-21
Z16C30 USC
®
U
SER
'
S
M
ANUAL
Z
ILOG
UM97USC0100
7.12 INTERRUPT PENDING AND UNDER SERVICE BITS
Software can read, set, and clear the
Interrupt Pending
(IP)
and
Interrupt Under Service (IUS)
bits, for all six
interrupt types in a USC channel, via the Daisy-Chain
Control Register (DCCR). Figure 7-16 shows the DCCR.
The MSByte deals only with the IUS bits, while the LSByte
deals with the IP bits but can be used to clear the IP and
IUS bits in one step.
Software can read the six IUS bits from DCCR13-8 and the
six IP bits from DCCR5-0. The two MSBits of each byte
always read as 00. When software writes the DCCR, the
two MSBits of each byte can represent a command that is
applied to the type(s) selected by ones written in the six
LSBits of that byte. DCCR15-14 are an
IUS Op
field that the
channel interprets as follows:
IUS Op
Operation
0x
No operation
10
Clear the IUS bit(s) of the type(s)
selected in DCCR13-8
11
Set the IUS bit(s) of the type(s)
selected in DCCR13-8
DCCR7-6 are an
IP Op
field that the channel interprets as
follows:
IP Op
Operation
00
No operation
01
Clear both the IP and IUS bit(s) of the
type(s) selected in DCCR5-0
10
Clear the IP bit(s) of the type(s) selected in
DCCR5-0
11
Set the IP bit(s) of the type(s) selected in
DCCR5-0
The “clear both” option seems efficient, but in general is
useful only during initialization sequences. The later sec-
tion “Software Requirements” describes how an interrupt
service routine should clear an IP bit before examining the
device status, but should delay clearing the IUS bit until the
ISR is (nearly) over.
If software writes both bytes of the DCCR simultaneously
on a 16-bit bus, the IUS command is “set”, the IP command
is “clear both”, and a particular type is selected by ones in
both the MSByte and LSByte, the channel clears the IUS bit
for that type. On the other hand, if the IUS command says
“set” for a type and the LSbyte says “clear both” but that
type’s bit in DDCR5-0 is 0, the channel sets that type’s IUS
bit.
In addition, one of the encoded commands that can be
written to the Channel Command/Address Register (CCAR)
allows for a general exit from an interrupt service routine,
regardless of which type initiated the routine. If software
writes the Reset Highest IUS command (00010) to a
channel’s RTCmd field (CCAR15-11), it clears the highest-
priority IUS bit that’s set in the channel.
UM009402-0201