You are not measuring the reference Voltage at pin V3out. Place an AMUX in front of ADC and swich the channels with a control register.
thank you for your advice, I tried to what you told me, the result is in the graphic attached, but I can´t get it working.
I tried to have the Vss in the ADC by enabling "Enable Vref/Vssa" and connecting it to ground over a pin, but that was not successful.
When i have a resistor of 2.7kOhms as Rx to measure the voltage over it the multimeter shows 3.755V and the ADC shows 3.763V. But the main Problem is that the voltage I am expecting is around 4.65V (Rx/Rx+Rref)*Ub = (2700/2700+200)*5V.
Where am I losing that voltage?
Thank you for your help, Greetings, Patrick
There is a resistor intern to the AMux switch, use the cydwr view, switch to analog and use the ohmmeter to estimate internal R
Thank you for your help, i measured and corrected the values for the resistors.
For this test I did not use any corrections for the offset, etc, thats just the values directly from the ADC and the ADC_Del_CountsTo_uVolts(ADC_Del_GetResult32) -function.
The problem with the calibration still exists, when i point the wire from the ADC to ground (0V) it shows a value of 42949 and a voltage value of 4294967224 (that´s in µV so it would be 4294 V, that´s impossible!? ), is that some sort of a over/underflow? When i point the wire to Vdd it shows a value of 44431 and a voltage of 5.086721 V, even if Vdd is only 4.7V on the USB-Programming adapter.
Any Tips to get correct measurements?
4294967224 is a 32bit uint, as an int32 it would represent the value -72 which is quite reasonable.
Your reference voltage is set to VDDA. You told (in .cydwr view/System) that it is 5.0V. So when it is not 5V (4.7) the conversion cannot be correct.
I would suggest you to
- Use the internal VRef of 1.024 V up to 6*VRef
- Bypass VRef on P0_3 with 1µF
- Change your input resistor ladder accordingly.