MC68336/376
QUEUED ANALOG-TO-DIGITAL CONVERTER MODULE
MOTOROLA
USER’S MANUAL
8-23
— This mode keeps the result registers updated more frequently than any of the
other queue operating modes. Software can always read the result table to get
the latest converted value for each channel. The channels scanned are kept
up to date by the QADC without software involvement.
— This mode may be chosen for either queue, but is normally used only with
queue 2. When the software initiated continuous-scan mode is chosen for
queue 1, that queue operates continuously and queue 2, being lower in prior-
ity, never gets executed. The short interval of time between a queue 1 pause
and 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 begin.
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
begin 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 begin 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.
336376UMBook Page 23 Friday, November 15, 1996 2:09 PM