AN1740 Freescale Semiconductor / Motorola, AN1740 Datasheet - Page 57

no-image

AN1740

Manufacturer Part Number
AN1740
Description
Applications Using the Analog Subsystem on MC68HC05JJ/JP Series Microcontrollers
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Conversion
Overlap A/D Fault
AN1740
MOTOROLA
Early conversions are difficult to detect unless the input signal is slow
changing allowing several readings to be taken and the average and/or
peak value used to determine the true conversion time.
When the conversion time becomes too long in mode 0 or mode 1, the
software is still looping on the conversion and no subsequent events can
occur. In mode 2 or mode 3, there exists the possibility that a very long
conversion will overlap the next TOF or OCF which is trying to start
another conversion. The net result will be that the ICF for the first
conversion may appear like a short conversion associated with the start
of the second conversion as shown in
may look like the infinite conversion fault mentioned above. This fault is
only associated with mode 2 or mode 3.
The problem of conversion overlaps can be detected if one or more
software flags are present so that the TOF or OCF interrupt routine can
determine that a prior conversion has been started but not finished.
Two suggested software flags are:
Freescale Semiconductor, Inc.
For More Information On This Product,
CIP — Conversion in progress
– Set when TOF or OCF occurs starting charge cycle
– Clear when ICF detected at end of conversion
TOF/OCF
CMP2
CFR2
CHG
PB0
ICF
V
IN
Go to: www.freescale.com
Figure 25. Conversion Overlap A/D Fault
V
SS
Figure 25
Pitfalls in Using Single Slope A/D
or the first conversion
Application Note
INCORRECT
TIME
57

Related parts for AN1740