This MicroConverter Technical Note uC005 from Analog Devices explains a software routine for calibrating the ADuC812 ADC for endpoint offset and gain errors. It describes the offset and gain calibration coefficients stored in the SFR area and how they compensate for DC offset and gain errors.
The note gives the CALZEROSCALE and CALFULLSCALE subroutines from the 812cal.asm file, their successive-approximation flow, and steps for evaluating the routines with the ADuC812 QuickStart Development System and a terminal program.
| ADC calibration coefficient count | 2 |
|---|---|
| Calibration coefficient width | 14 bits |
| Offset calibration coefficient registers | ADCOFSH (6 bits) and ADCOFSL (8 bits) |
| Gain calibration coefficient registers | ADCGAINH (6 bits) and ADCGAINL (8 bits) |
| Maximum offset compensation | typically +5% of VREF |
| Maximum offset with 2.5V reference | typically +125mV |
| Maximum analog input signal range for gain compensation | 1.025 * VREF |
| Minimum analog input signal range for gain compensation | 0.975 * VREF |
| Stack usage of calibration subroutine | 8 bytes |
The ADuC812 has two ADC calibration coefficients: one for offset calibration and one for gain calibration.
It compensates for DC offset errors in both the ADC and the input signal.
The maximum offset that can be compensated is typically +5% of VREF.
It must be held at a fixed system full-scale reference voltage within +2.5% of VREF.