6 Replies Latest reply on May 17, 2017 3:58 AM by userc_38655

    ADC Single Sample mode funny behaviour



      I am trying to work with Sigma-Delta ADC in single-sample mode for 16 bit in PSoC 5. I am testing my ADC by feeding it with 20Hz sine wave. This sine wave is generated by waveform DAC.


      For 60 samples at sampling interval of 5 milli-sec about 6 peaks are expected from the ADC output [(60 *5ms)/50ms =6]. However I see 9 peaks when the raw ADC samples are plotted. I have attached the screenshot of the same.


      Note :- I have checked the waveform DAC on the oscilloscope and 20Hz was observed.


      Am I doing something wrong here ?


      I am also attaching the project bundle.


      My main.c looks something like this:


      #define NO_SAMPLES 60
      #define SAMPLING_INTERVAL_MS 5
      #include <project.h>


      uint8 count=0;
      int32 samples[NO_SAMPLES];


      int main()
          CyGlobalIntEnable; /* Enable global interrupts. */


          /* Place your initialization/startup code here (e.g. MyInst_Start()) */
          for(count =0; count<NO_SAMPLES;count++)