Without seeing your project and code difficult to help. Post project
archive, "File", "Archive Project", post with any browser other than chrome.
I presume you are doing this via register writes to control PGA input -
- Offset Compensation
- This parameter enables or disables correlated double sampling. For more details on correlated double sampling, refer to AN2226 . To perform offset compensation, set PGA reference to AGND, connect the PGA input to AGND, and perform a single conversion. Store the output of the ADC in a RAM variable. During all other measurements, this offset value is subtracted from the ADC result.
- Regards, Dana.
Thank you for your response. I am simply using the code directly from the datasheet for the ezADC. There is the offset compensation setting which I simplistically assume to mean that it will automatically do offset compensation. Looking at the user module ezADCINT.asm, it looks like it does do this, only I do not get the effect. I attach a zip of my project. I could follow the method shown in the AN you indicated (also in the ezADC data sheet and it was the motivation for using ezADC), but ezADC seems to imply it does it. Is this correct?
ezADC29866.zip 348.5 K
There seems to be no indication that CDS is an automatic process based
on the way the offset compensation is described. And none of the APIs carry
notes to the effect that the reading will be automatically corrected. Or for that
matter a variable called out with the correction value. Or any timing of switching
the PGA to get its offset.
Post a CASE to confirm (and please update this thread) -
“Create a MyCase”