
QSM
REFERENCE MANUAL
USING THE QSPI FOR ANALOG DATA AQUISITION
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
A-1
APPENDIX A
USING THE QSPI FOR ANALOG DATA AQUISITION
A.1 Introduction
To effectively use digital microcontroller units (MCUs) in an analog world, analog in-
formation must be converted into digital form. In all applications, fast, accurate, and
inexpensive conversion is desirable. Minimizing printed circuit board space and inter-
connections is also desirable.
NOTE
This application note can be applied to any MCU (i.e., MC68332,
MC68HC16Z1, etc.) containing queued serial peripheral interface
(QSPI) circuitry.
The MC68332 lacks any direct analog-to-digital (A/D) conversion capabilities. This de-
ficiency is easily and inexpensively remedied by connecting the QSPI to an external
serial A/D converter.
This application note presents hardware and software examples detailing use of the
QSPI with multichannel 8- and 10-bit A/D converters, specifically the MC145040 and
the MC145050. It describes design methodology for obtaining maximum A/D through-
put, using one or more A/D converters. It also discusses how to simultaneously use
other peripherals with the QSPI and how to determine overall system performance.
A.2 Operation of the MC145040 and MC145050 Family A/D Converters
The following paragraphs give a brief overview of the Motorola serial A/D converters.
For a more thorough treatment of the subject, refer to
Reference 3.
and
Reference 4.
The MC145040, MC145041, MC145050, and MC145051 are low-cost, ratiometric, 11-
channel A/D converters. They are designed for connection to a microcomputer system
with channel selection and conversion results being conveyed through a serial inter-
face port. They require only 14 mW from a single 5-V power supply and yield ±1 LSB
accuracy over the -40 to +125
°
C range. The reference voltage can be anywhere from
+2.5 V to V
DD
, and the analog input voltage may range from V
SS
to V
DD
.
The MC145050 and MC145051 are 10-bit converters; whereas, the MC145040 and
MC145041 are 8-bit converters. The MC145040 and MC145050 use external clock
sources to perform the conversion; the MC145041 and MC145051 use internal RC os-
cillators. The parts using external oscillators guarantee faster conversion rates be-
cause internal oscillator frequency must be limited to guarantee reasonable yield
despite manufacturing tolerances. The remaining A/D converter description refers
specifically to the MC145050 since it is the converter used in the examples presented.
Figure A-1
shows the pinout of the MC145050. It has 13 analog pins, consisting of 11
F
Freescale Semiconductor, Inc.
n
.