
MOTOROLA
A-12
USING THE QSPI FOR ANALOG DATA AQUISITION
For More Information On This Product,
Go to: www.freescale.com
QSM
REFERENCE MANUAL
the QSPI. While the QSPI is operating, writing to the NEWQP field (lower byte of
SPCR2) will cause the QSPI to complete the transfer already in progress, then exe-
cute the transfer specified by NEWQP. Normal operation (transferring queue entries
in sequence) continues from the point indicated by NEWQP. If a new ENDQP value is
also written, its value is used to determine the end of the queue. There is no implicit
return mechanism, but if the queue is properly structured, the original operation will re-
sume automatically.
Figure A-9
shows the queue structure and operation flow that demonstrates this ca-
pability. Assuming the QSPI is already in operation (scanning A/D channels 3, 4, and
6) when the interrupt arrives, the software merely sets up the QSPI RAM associated
with the special event, then writes $0E to the lower byte of SPCR2. This procedure
causes the QSPI to complete the present transfer, then transfer queue entries E and
F. Since ENDQP is still two, the QSPI will then transfer entries 0, 1, and 2, then wrap
back to entry 0. The software never has to modify any control registers or respond to
QSPI interrupts because the original queue is resumed automatically. For minimum la-
tency, the program should initialize the control RAM (and the transmit RAM, if possi-
ble) for the special operation before the operation is to occur to initiate the subqueue
transfer.
A.8 References
The following are resources which contain further information on the topics discussed
in this application note.
1. Harman, Thomas L. The Motorola MC68020 and MC68030 Microprocessors:
Assembly Language, Interfacing, and Design. Englewood Cliffs, NJ: Prentice-
Hall, 1989.
2. MC68332 User's Manual (MC68332 UM/AD). Motorola, Inc., 1990.
3. 8-Bit A/D Converters with Serial Interface (MC145040/D). Motorola, Inc., 1990.
4. 10-Bit A/D Converters with Serial Interface(MC145050/D). Motorola, Inc.,
1990.
F
Freescale Semiconductor, Inc.
n
.