1 of 1 people found this helpful
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.
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.
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.