Datasheet

Analog-to-Digital Converter (S08ATDV3)
MC9S08GB60A Data Sheet, Rev. 2
Freescale Semiconductor 237
14.6.3 ATD Result Data (ATD1RH, ATD1RL)
For left-justified mode, result data bits 9–2 map onto bits 7–0 of ATD1RH, result data bits 1 and 0 map
onto ATD1RL bits 7 and 6, where bit 7 of ATD1RH is the most significant bit (MSB).
Table 14-6. ATD1SC Field Descriptions
Field Description
7
CCF
Conversion Complete Flag — The CCF is a read-only bit which is set each time a conversion is complete. The
CCF bit is cleared whenever the ATD1SC register is written. It is also cleared whenever the result registers,
ATD1RH or ATD1RL, are read.
0 Current conversion is not complete.
1 Current conversion is complete.
6
ATDI E
ATD Interrupt Enabled — When this bit is set, an interrupt is generated upon completion of an ATD conversion.
At this time, the result registers contain the result data generated by the conversion. The interrupt will remain
pending as long as the conversion complete flag CCF is set. If the ATDIE bit is cleared, then the CCF bit must
be polled to determine when the conversion is complete. Note that system reset clears pending interrupts.
0 ATD interrupt disabled.
1 ATD interrupt enabled.
5
ATDCO
ATD Continuous Conversion — When this bit is set, the ATD will convert samples continuously and update the
result registers at the end of each conversion. When this bit is cleared, only one conversion is completed between
writes to the ATD1SC register.
0 Single conversion mode.
1 Continuous conversion mode.
4:0
ATD CH
Analog Input Channel Select — This field of bits selects the analog input channel whose signal is sampled and
converted to digital codes. Ta bl e 1 4- 7 lists the coding used to select the various analog input channels.
Table 14-7. Analog Input Channel Select Coding
ATDCH Analog Input Channel
00 AD0
01 AD1
02 AD2
03 AD3
04 AD4
05 AD5
06 AD6
07 AD7
08–1D
Reserved (default to V
REFL
)
1E
V
REFH
1F
V
REFL