English
Language : 

MC9S08DZ60ACLH Datasheet, PDF (194/416 Pages) Freescale Semiconductor, Inc – MC9S08DZ60 Series Features
Chapter 10 Analog-to-Digital Converter (S08ADC12V1)
ADCSC1 = 0x41 (%01000001)
Bit 7
Bit 6
Bit 5
Bit 4:0
COCO
AIEN
ADCO
ADCH
0
1
0
00001
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
ADCRH/L = 0xxx
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.
ADCCVH/L = 0xxx
Holds compare value when compare function enabled
APCTL1=0x02
AD1 pin I/O control disabled. All other AD pins remain general purpose I/O pins
APCTL2=0x00
All other AD pins remain general purpose I/O pins
Reset
Initialize ADC
ADCCFG = 0x98
ADCSC2 = 0x00
ADCSC1 = 0x41
Check
No
COCO=1?
Yes
Read ADCRH
Then ADCRL To
Clear COCO Bit
Continue
Figure 10-13. Initialization Flowchart for Example
MC9S08DZ60 Series Data Sheet, Rev. 4
194
Freescale Semiconductor