3 Replies Latest reply on Dec 8, 2013 9:52 AM by user_14586677

    ezADC qestion

    user_44287455
              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   
        • 1. Re: ezADC qestion
          user_14586677

          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.    
             
             
              
             
             
              
             
          • 2. Re: ezADC qestion
            user_44287455
                    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?   
            • 3. Re: ezADC qestion
              user_14586677

              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) -

                 

               

                 

                  

                 

                        

                 

              www.cypress.com

                 

              “Support”

                 

              “Technical Support”

                 

              “Create a MyCase”

                 

               

                 

              Regards, Dana