mc9s08dz32amlfr Freescale Semiconductor, Inc, mc9s08dz32amlfr Datasheet - Page 228

no-image

mc9s08dz32amlfr

Manufacturer Part Number
mc9s08dz32amlfr
Description
Hcs08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Chapter 10 Analog-to-Digital Converter (S08ADC12V1)
ADCSC1 = 0x41 (%01000001)
ADCRH/L = 0xxx
ADCCVH/L = 0xxx
APCTL1=0x02
APCTL2=0x00
228
Bit 7
Bit 6
Bit 5
Bit 4:0 ADCH
Holds results of conversion. Read high byte (ADCRH) before low byte (ADCRL) so that
conversion data cannot be overwritten with data from the next conversion.
Holds compare value when compare function enabled
AD1 pin I/O control disabled. All other AD pins remain general purpose I/O pins
All other AD pins remain general purpose I/O pins
COCO
AIEN
ADCO
Figure 10-13. Initialization Flowchart for Example
0
1
0
00001
MC9S08DZ128 Series Data Sheet, Rev. 1
Read-only flag which is set when a conversion completes
Conversion complete interrupt enabled
One conversion only (continuous conversions disabled)
Input channel 1 selected as ADC input channel
ADCCFG = 0x98
ADCSC1 = 0x41
Then ADCRL To
Clear COCO Bit
ADCSC2 = 0x00
Read ADCRH
Initialize ADC
COCO=1?
Continue
Check
Reset
Yes
No
Freescale Semiconductor

Related parts for mc9s08dz32amlfr