
MOTOROLA
7-20
DIGITAL CONTROL
QADC
REFERENCE MANUAL
dedicated to queue 2. As a special case, when a queue operating mode for queue 1
is selected and a trigger event occurs for queue 1 with BQ2 set to 0, queue 1 execution
is terminated after CCW0 is read. Conversions do not occur.
The BQ2 pointer may be changed dynamically, to alternate between queue 2 scan se-
quences. A change in BQ2 while queue 2 is active does not take effect until an end-
of-queue condition is recognized, or until the queue operating mode of queue 2 is
changed. For example, two scan sequences could be defined as follows: the first se-
quence starts at CCW10, with a pause after CCW11 and an EOQ programmed in
CCW15; the second sequence starts at CCW16, with a pause after CCW17 and an
EOQ programmed in CCW39.
With BQ2 set to CCW10 and the continuous-scan mode selected, queue execution
begins. When the pause is encountered in CCW11, a software interrupt routine can
redefine BQ2 to be CCW16. Therefore, after the end-of-queue is recognized in
CCW15, an internal retrigger event is generated and execution restarts at CCW16.
When the pause software interrupt occurs again, software can change BQ2 back to
CCW10. After the end-of-queue is recognized in CCW39, an internal retrigger event
is created and execution now restarts at CCW10.
If BQ2 is changed while queue 1 is active, the effect of BQ2 as an end-of-queue indi-
cation for queue 1 is immediate.
NOTE
If BQ2 was assigned to the CCW that queue 1 is currently working
on, then that conversion is completed before BQ2 takes effect.
Each time a CCW is read for queue 1, the CCW location is compared with the current
value of the BQ2 pointer to detect a possible end-of-queue condition. For example, if
BQ2 is changed to CCW3 while queue 1 is converting CCW2, queue 1 is terminated
after the conversion is completed. However, if BQ2 is changed to CCW1 while queue
1 is converting CCW2, the QADC would not recognize a BQ2 end-of-queue condition
until queue 1 execution reached CCW1 again, presumably on the next pass through
the queue.
7.6.4 Status Register
The status register contains information about the state of each queue and the current
A/D conversion. Except for the four flag bits (CF1, PF1, CF2, and PF2) and the two
trigger overrun bits (TOR1 and TOR2), all of the status register fields contain read-only
data. The four flag bits and the two trigger overrun bits are cleared by writing a zero to
the bit after the bit was previously read as a one.
QASR —
Status Register
$####10
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
CF1
PF1
CF2
PF2
TOR1
TOR2
QS
CWP
RESET:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.