The PIC18F26K80 errata sheet mentions that the ADC has an offset error as high as 25 bits and discusses one workaround copied from the errata here:

A/D Offset The A/D may have high offset error, up to a maximum of ±25 LSBs; it can be used if the A/D is calibrated for the offset.

Work around Calibrate for offset in Single-Ended mode by connecting A/D positive input to ground and taking the A/D reading. This will be the offset of the device and can be used to compensate for the subsequent A/D readings on the actual inputs.

I have an existing circuit where connecting the AD input to ground is going to be difficult - so I was looking for alternatives.

The ADC has provision for connecting the positive input to an internal bandgap voltage reference (Channel 31)

Pg 358 in datasheet

My Question: Would measuring the bandgap voltage serve as a way of identifying the offset error also or would each channel have a different offset?


1 Answer 1


It should work for all channels, since they are all connected to the same ADC (it just switches between them)
You can confirm this by taking an offset reading on each channel to make sure they agree with each other.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.