Datasheet

Device Overview MC9S12G-Family
MC9S12G Family Reference Manual, Rev.1.23
154 Freescale Semiconductor
1.17 ADC Result Reference
MCUs of the S12G-Family are able to measure the internal reference voltage V
DDF
(see Table 1-38). V
DDF
is a constant voltage with a narrow distribution over temperature and external voltage supply (see
Table A-43).
A 12-bit left justified
1
ADC conversion result of V
DDF
is provided at address 0x0_4022/0x0_4023 in the
NVM’s IFR for reference.The measurement conditions of the reference conversion are listed in
Section A.16, ADC Conversion Result Reference. By measuring the voltage V
DDF
(see Table 1-38) and
comparing the result to the reference value in the IFR, it is possible to determine the ADC’s reference
voltage V
RH
in the application environment:
The exact absolute value of an analog conversion can be determined as follows:
With:
ConvertedADInput: Result of the analog to digital conversion of the desired pin
ConvertedReference: Result of channel “Internal_0” conversion
StoredReference: Value in IFR locatio 0x0_4022/0x0_4023
n: ADC resolution (10 bit)
CAUTION
To assure high accuracy of the V
DDF
reference conversion, the NVMs must
not be programmed, erased, or read while the conversion takes place. This
implies that code must be executed from RAM. The “ConvertedReference”
value must be the average of eight consecutive conversions.
CAUTION
The ADC’s reference voltage V
RH
must remain at a constant level
throughout the conversion process.
1.18 ADC VRH/VRL Signal Connection
On all S12G devices except for the S12GA192 and the S12GA240 the external VRH signal is directly
connected to the ADC’s VRH signal input. The ADC’s VRL input is connected to VSSA. (see
Figure 1-27).
1. The format of the stored V
DDF
reference value is still subject to change.
V
RH
StoredReference
ConvertedReference
-------------------------------------------------------------
5V=
Result ConvertedADInput
StoredReference 5V
ConvertedReference 2
n
-------------------------------------------------------------------------
=