AN1740 Freescale Semiconductor / Motorola, AN1740 Datasheet - Page 51

no-image

AN1740

Manufacturer Part Number
AN1740
Description
Applications Using the Analog Subsystem on MC68HC05JJ/JP Series Microcontrollers
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Step-By-Step A/D
Conversion
AN1740
MOTOROLA
After selecting the right components, the single slope A/D can be
operated as a series of simple software controlled steps:
Refer to application note A/D Conversion Software for the
MC68HC05JJ/JP Series Microcontrollers , Motorola document order
number AN1739/D, for detailed software examples on how to implement
a mode 0, 1, 2, or 3 A/D conversion.
10. When the ramp capacitor is fully discharged, go back to step 3.
1. Initialize the analog subsystem to the desired configuration.
2. Discharge the internal sample capacitor and channel select bus.
3. Select a signal source.
4. Start charging the ramp capacitor (set CHG bit in ACR).
5. Keep track of time while waiting for comparator 2 output to go high.
6. Capture time when comparator 2 output goes high.
7. Start discharging the ramp capacitor (clear CHG bit in ACR).
8. Calculate the charge time.
9. Compare the charge time to that for a reference signal.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
Analog-to-Digital Conversion
Application Note
51

Related parts for AN1740