|
MC9S08GT16A Datasheet, PDF (229/300 Pages) Freescale Semiconductor, Inc – Microcontrollers | |||
|
◁ |
Analog-to-Digital Converter (S08ATDV3)
14.3.3 ATD Result Data (ATDRH, ATDRL)
For left-justiï¬ed mode, result data bits 9â2 map onto bits 7â0 of ATDRH, result data bits 1 and 0 map onto
ATDRL bits 7 and 6, where bit 7 of ATDRH is the most signiï¬cant bit (MSB).
76543210
76543210
9
RESULT
0
ATD1RH
ATD1RL
Figure 14-7. Left-Justiï¬ed Mode
For right-justiï¬ed mode, result data bits 9 and 8 map onto bits 1 and 0 of ATDRH, result data bits 7â0 map
onto ATDRL bits 7â0, where bit 1 of ATDRH is the most signiï¬cant bit (MSB).
76543210
76543210
9
RESULT
0
ATD1RH
ATD1RL
Figure 14-8. Right-Justiï¬ed Mode
The ATD 10-bit conversion results are stored in two 8-bit result registers, ATDRH and ATDRL. The result
data is formatted either left or right justiï¬ed where the format is selected using the DJM control bit in the
ATDC register. The 10-bit result data is mapped either between ATDRH bits 7â0 and ATDRL bits 7â6 (left
justiï¬ed), or ATDRH bits 1â0 and ATDRL bits 7â0 (right justiï¬ed).
For 8-bit conversions, the 8-bit result is always located in ATDRH bits 7â0, and the ATDRL bits read 0.
For 10-bit conversions, the six unused bits always read 0.
The ATDRH and ATDRL registers are read-only.
14.3.4 ATD Pin Enable (ATDPE)
R
W
Reset
7
ATDPE7
0
6
ATDPE6
5
ATDPE5
4
ATDPE4
3
ATDPE3
2
ATDPE2
0
0
0
0
0
Figure 14-9. ATD Pin Enable Register (ATDPE)
1
ATDPE1
0
0
ATDPE0
0
Table 14-7. ATDSC Register Field Descriptions
Field
Description
7:0
ATDPE[7:0]
ATD Pin 7â0 Enables â The ATD pin enable register allows the pins dedicated to the ATD module to be
conï¬gured for ATD usage. A write to this register will abort the current conversion but will not initiate a new
conversion. If the ATDPEx bit is 0 (disabled for ATD usage) but the corresponding analog input channel is
selected via the ATDCH bits, the ATD will not convert the analog input but will instead convert VREFL placing
zeroes in the ATD result registers.
0 Pin disabled for ATD usage.
1 Pin enabled for ATD usage.
MC9S08GT16A/GT8A Data Sheet, Rev. 1
Freescale Semiconductor
229
|
▷ |