Analog-to-Digital Converter (ADC12B12CV2) Block Description
MC9S12VRP Family Reference Manual Rev. 1.3
266
NXP Semiconductors
8.3.2.12
ATD Conversion Result Registers (ATDDR
n
)
The A/D conversion results are stored in 12 result registers. Results are always in unsigned data
representation. Left and right justification is selected using the DJM control bit in ATDCTL3.
If automatic compare of conversions results is enabled (CMPE[
n
]=1 in ATDCMPE), these registers must
be written with the compare values in left or right justified format depending on the actual value of the
DJM bit. In this case, as the ATDDR
n
register is used to hold the compare value, the result will not be
stored there at the end of the conversion but is lost.
Attention, n is the conversion number, NOT the channel number!
Read: Anytime
Write: Anytime
NOTE
For conversions not using automatic compare, results are stored in the result
registers after each conversion. In this case avoid writing to ATDDRn
except for initial values, because an A/D result might be overwritten.
8.3.2.12.1
Left Justified Result Data (DJM=0)
shows how depending on the A/D resolution the conversion result is transferred to the ATD
result registers for left justified data. Compare is always done using all 12 bits of both the conversion result
and the compare value in ATDDRn.
Table 8-21. Conversion result mapping to ATDDRn
Module Base +
0x0010 = ATDDR0, 0x0012 = ATDDR1, 0x0014 = ATDDR2, 0x0016 = ATDDR3
0x0018 = ATDDR4, 0x001A = ATDDR5, 0x001C = ATDDR6, 0x001E = ATDDR7
0x0020 = ATDDR8, 0x0022 = ATDDR9, 0x0024 = ATDDR10, 0x0026 = ATDDR11
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
R
Result-Bit[11:0]
0
0
0
0
W
Reset
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
= Unimplemented or Reserved
Figure 8-14. Left justified ATD conversion result register (ATDDR
n
)
A/D
resolution
DJM
conversion result mapping to
ATDDR
n
8-bit data
0
Result-Bit[11:4] = conversion result,
Result-Bit[3:0]=0000
10-bit data
0
Result-Bit[11:2] = conversion result,
Result-Bit[1:0]=00
Summary of Contents for MC9S12VRP64
Page 16: ...MC9S12VRP Family Reference Manual Rev 1 3 16 NXP Semiconductors ...
Page 46: ...Device Overview S12VRP Series MC9S12VRP Family Reference Manual Rev 1 3 46 NXP Semiconductors ...
Page 236: ...S12S Debug Module S12DBGV2 MC9S12VRP Family Reference Manual Rev 1 3 236 NXP Semiconductors ...
Page 244: ...Interrupt Module S12SINTV1 MC9S12VRP Family Reference Manual Rev 1 3 244 NXP Semiconductors ...
Page 358: ...Timer Module TIM16B2CV3 MC9S12VRP Family Reference Manual Rev 1 3 358 NXP Semiconductors ...
Page 436: ...Supply Voltage Sensor BATSV2 MC9S12VRP Family Reference Manual Rev 1 3 436 NXP Semiconductors ...
Page 528: ...NVM Electrical Parameters MC9S12VRP Family Reference Manual Rev 1 3 528 NXP Semiconductors ...
Page 530: ...Package Information MC9S12VRP Family Reference Manual Rev 1 3 530 NXP Semiconductors ...
Page 531: ...Package Information MC9S12VRP Family Reference Manual Rev 1 3 NXP Semiconductors 531 ...
Page 532: ...Package Information MC9S12VRP Family Reference Manual Rev 1 3 532 NXP Semiconductors ...