3 Gain Error Compensation

After the ADC has run its automatic calibration procedure on start-up, the gain error may have shifted from that of the previous start-up calibration cycle. To enhance accuracy, the dsPIC33AK devices provide an internal voltage reference source to support run-time gain error compensation. After the automatic start-up calibration procedure is complete, the provided software gain calibration routine can be run once, and the compensation coefficient can be applied to the ADC results. The dsPIC33AK family of devices has more than one ADC instance, and each ADC instance needs to be calibrated independently.