
MC68336/376
QUEUED ANALOG-TO-DIGITAL CONVERTER MODULE
MOTOROLA
USER’S MANUAL
Rev. 15 Oct 2000
8-23
the internally generated trigger event, or between a queue 1 completion and
the subsequent trigger event is not sufficient to allow queue 2 execution to be-
gin.
External trigger rising or falling edge continuous-scan mode
— The QADC provides external trigger pins for both queues. When this mode is
selected, a transition on the associated external trigger pin initiates queue ex-
ecution. The external trigger is programmable, so that queue execution can be-
gin on either a rising or a falling edge. Each CCW is read and the indicated
conversions are performed until an end-of-queue condition is encountered.
When the next external trigger edge is detected, queue execution begins again
automatically. Software initialization is not needed between trigger events.
Periodic timer continuous-scan mode
— In addition to the previous modes, queue 2 can also be programmed for the
periodic timer continuous-scan mode, where a scan is initiated at a selectable
time interval using the on-chip periodic/interval timer. The queue operating
mode for queue 2 is selected by the MQ2 field in QACR2.
— The QADC includes a dedicated periodic/interval timer for initiating a scan
sequence for queue 2 only. A programmable timer interval can be selected
ranging from 27 to 217 times the QCLK period in binary multiples.
— When this mode is selected, the timer begins counting. After the programmed
interval elapses, the timer generated trigger event starts the queue. The timer
is then reloaded and begins counting again. Meanwhile, the QADC automati-
cally performs the conversions in the queue until an end-of-queue condition or
a pause is encountered. When a pause is encountered, the QADC waits for the
periodic interval to expire again, then continues with the queue. When an end-
of-queue is encountered, the next trigger event causes queue execution to be-
gin again with the first CCW in queue 2.
— The periodic timer generates a trigger event whenever the time interval
elapses. The trigger event may cause queue execution to continue following a
pause or queue completion, or may be considered a trigger overrun. As with
all continuous-scan queue operating modes, software action is not needed be-
tween trigger events.
— If the queue completion interrupt is enabled when using this mode, software
can read the analog results that have just been collected. Software can use
this interrupt to obtain non-analog inputs as well, as part of a periodic look at
all inputs.
8.12.4 QADC Clock (QCLK) Generation
Figure 8-8 is a block diagram of the clock subsystem. QCLK provides the timing for
the A/D converter state machine which controls the timing of conversions. QCLK is
also the input to a 17-stage binary divider which implements the periodic/interval timer.
To obtain the specified analog conversion accuracy, the QCLK frequency (fQCLK) must
Before using the QADC, software must initialize the prescaler with values that put
QCLK within a specified range. Though most applications initialize the prescaler once
and do not change it, write operations to the prescaler fields are permitted.