
MOTOROLA
QUEUED ANALOG-TO-DIGITAL CONVERTER MODULE
MC68336/376
8-32
USER’S MANUAL
8.13 Interrupts
The QADC supports both polled and interrupt driven operation. Status bits in QASR
reflect the operating condition of each queue and can optionally generate interrupts
when enabled by the appropriate bits in QACR1 and/or QACR2.
8.13.1 Interrupt Sources
The QADC has four interrupt service sources, each of which is separately enabled.
Each time the result is written for the last CCW in a queue, the completion flag for the
corresponding queue is set, and when enabled, an interrupt request is generated. In
the same way, each time the result is written for a CCW with the pause bit set, the
queue pause flag is set, and when enabled, an interrupt request is generated.
Table 8-5 displays the status flag and interrupt enable bits which correspond to queue
1 and queue 2 activity.
Both polled and interrupt-driven QADC operations require that status flags must be
cleared after an event occurs. Flags are cleared by first reading QASR with the appro-
priate flag bits set to one, then writing zeros to the flags that are to be cleared. A flag
can be cleared only if the flag was a logic one at the time the register was read by the
CPU. If a new event occurs between the time that the register is read and the time that
it is written, the associated flag is not cleared.
8.13.2 Interrupt Register
The QADC interrupt register QADCINT specifies the priority level of QADC interrupt
requests and the upper six bits of the vector number provided during an interrupt ac-
knowledge cycle.
The values contained in the IRLQ1 and IRLQ2 fields in QADCINT determine the pri-
ority of QADC interrupt service requests. A value of %000 in either field disables the
interrupts associated with that field. The interrupt levels for queue 1 and queue 2 may
be different.
The IVB[7:2] bits specify the upper six bits of each QADC interrupt vector number.
IVB[1:0] have fixed assignments for each of the four QADC interrupt sources. Refer to
Table 8-5 QADC Status Flags and Interrupt Sources
Queue
Queue Activity
Status Flag
Interrupt Enable Bit
Queue 1
Result written for the last CCW in queue 1
CF1
CIE1
Result written for a CCW with pause bit set in
queue 1
PF1
PIE1
Queue 2
Result written for the last CCW in queue 2
CF2
CIE2
Result written for a CCW with pause bit set in
queue 2
PF2
PIE2
336376UMBook Page 32 Friday, November 15, 1996 2:09 PM