3 Replies Latest reply on Nov 21, 2019 10:38 AM by BoTa_264741

    output of ADC with 12 bit resolution


      Hello community,

      I'm using the ADC, 12 bits with the psoc4 pioneer kit. The analog input comes from a potentiometer, the max voltage on the input pin is: 4,62 Volts (measured). I'm using 5 V for reverence. So I expect an output value of 3784 with this voltage. But the maximum output I get is: 3368. I've attached the project.  The output is shown on a 7 segment display on an arduino multifunction shield. What is going wrong? Thank. Mark.

        • 1. Re: output of ADC with 12 bit resolution


          When Vdd is used as a reference, the ADC is using actual voltage, which may differ from the nominal 5V value. You must measure actual voltage provided to the chip and it is usually 4.7-4.8V, when kit is powered through the USB port (the difference comes from the protection diode, which eats away ~0.2V). Put this measured value in the Design Wide Resources->System->VDDA. This way PSoC will know actual reference voltage.


          Note that ADC results will depend on power supply voltage fluctuations. For more accurate measurements, use built-in voltage reference (typ. 1.2V), which does not vary with power fluctuations.




          P.S. Upon reading your question again, I think that you asked about different issue. Please disregard.

          1 of 1 people found this helpful
          • 2. Re: output of ADC with 12 bit resolution

            Thanks for your reply. I tried setting VDDA to 4.6 Volts (same output of 3368) and I tried the build in Voltage (very weird output). If anyone has some sort of guidance (tutorials, etc), much appreciated. Meanwhile, I'll try to figure this out.

            • 3. Re: output of ADC with 12 bit resolution


              Can you check what is reported result in Voltage, rather than in Count. Use ADC_CountsToMv(Count). I suspect that Counts result depends on value of the SAR_ADC charging capacitor, which is not very accurate (>10%). as a result, Count output may vary from chip-to-chip. But when Counts are converted to Volts (or mV), this is taken care by the calibration constant (a register, which can be adjusted if necessary).


              So my advice would be to set VDDA (4.6V) as discussed above,  convert Count to mV and compare result to the input voltage again.