Enhanced Queued Analog-to-Digital Converter (eQADC)
MPC5510 Microcontroller Family Reference Manual, Rev. 1
31-82
Freescale Semiconductor
Preliminary
The raw, uncalibrated results for these input voltages are obtained by converting these channels with
conversion commands that have the CAL bit negated.
The transfer equations for when sampling these reference voltages are:
CAL_RES75%VREF = GCC * RAW_RES75%VREF + OCC +2;
Eqn. 31-2
CAL_RES25%VREF = GCC * RAW_RES25%VREF + OCC +2;
Eqn. 31-3
Thus;
GCC = (CAL_RES75%VREF - CAL_RES25%VREF ) / (RAW_RES75%VREF - RAW_RES25%VREF ); Eqn. 31-4
OCC = CAL_RES75%VREF - GCC*RAW_RES75%VREF – 2 ;
Eqn. 31-5
or
OCC = CAL_RES25%VREF - GCC*RAW_RES25%VREF – 2 ;
Eqn. 31-6
After being calculated, the GCC and OCC values must be written to ADC0_GCCR(see
“ADC0 Gain Calibration Constant Register (ADC0_GCCR)
”) and the ADC0_OCCR (see
Section 31.3.4.5, “ADC0 Offset Calibration Constant Register (ADC0_OCCR)
configuration commands.
The eQADC will automatically calibrate the results, according to
, of every conversion
command that has its CAL bit asserted using the GCC and OCC values stored in the ADC calibration
registers.
31.5.6.1
MAC Configuration Procedure
The following steps illustrate how to configure the calibration hardware, that is, determining the values of
the gain and offset calibration constants, and the writing these constants to the calibration registers.
1. Convert channel 44 with a command that has its CAL bit negated and obtain the raw, uncalibrated
result for 25%VREF (RAW_RES
25%VREF
).
2. Convert channel 43 with a command that has its CAL bit negated and obtain the raw, uncalibrated
result for 75%VREF (RAW_RES
75%VREF
).
3. Because the expected values for the conversion of these voltages are known (CAL_RES
25%VREF
and CAL_RES
75%VREF
), GCC and OCC values can be calculated from
using these values, and the results determined in steps 1 and 2.
4. Reformat GCC and OCC to the proper data formats as specified in
.” GCC is an unsigned 15-bit fixed point value and OCC is a signed
14-bit value.
5. Write the GCC value to ADC0 gain calibration register (see
Calibration Constant Register (ADC0_GCCR)
”) and the OCC value to ADC0 offset calibration
Section 31.3.4.5, “ADC0 Offset Calibration Constant Register
”) using write configuration commands.