Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
The ezADC looks great on paper for double correlated sampling. However, the data sheet leaves much to be desired and I am absolutely at a loss of how to actually get it to work. If I disable the offset compensation all is fine. If I enable offset compensation, all I can ever get is 0. It makes no sense. Any help would be appreciated in making this work. I could bypass ezADC and do the double compensated sampling manually, but if this does it... M
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 -
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.
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?