The user calibration procedure is similar to the calibration command procedure, except the user computes the calibration coefficients and writes the corresponding values to the calibration registers. Before starting user calibration, preset the ADC1 offset and full-scale registers to 000000h and 400000h, respectively.
For ADC2, preset the offset and full-scale registers to 0000h and 4000h, respectively.
For offset calibration, short the ADC inputs or system inputs and average the conversions (averaging reduces noise for a more accurate calibration). Write the average value to the offset calibration registers. The ADC subtracts the value from the conversion result.
For full-scale calibration, apply a dc calibration voltage that is less than positive full scale to avoid clipped codes (VIN < +FSR), and average the conversions to reduce noise for a more accurate calibration. Full-scale calibration is computed as shown in Equation 23:
If the actual code is higher than the expected value, the calculated calibration value is less than 400000h (4000h) and the ADC gain is subsequently reduced. Write the calibration value to the full-scale register.