3.10 AD Calibration Verification
On supported boards (-AT boards), after performing an A/D autocalibration, you can verify the accuracy of the calibration. This function will return the offset and gain error of each range in LSBs.
The default A/D calibration tolerance for all boards is +/-2LSBs. In general autocalibration will result in errors of +/-1LSB or less.
Create and initialize an A/D auto-calibration settings structure (DSCADCALPARAMS) .
Select the A/D range to verify. For an individual range, select the range number 0-15. For all ranges, select 255.
Call dscADCalVerify and pass it a pointer to this structure in order to verify the A/D calibration of the board. The elements ad_offset and ad_gain will contain the error in LSB counts for A/D operations. Values of less than 2 are within tolerance.
/* Step 1 */
dscadcalparams.adrange = 8; // select the range to verify; 255 = all ranges
/* Step 2 */
if ((result = dscADCalVerify(dscb, &dscadcalparams)) != DE_NONE)