Hi,
Could you check my algorythm. In my application im measuring temperature using RTD.
First: measure Vref (voltage on Rref 820Ohm on my board) which is about 2460mV.
Vref=(2048*ADC_result)/0x7f ff ff
Second : Use measured voltage to calculate proper voltage value for RTD.
Vrtd=(Vref * ADC_result)/0x7f ff ff
If i dont measure Vref and write to Vref Variable 2460 (Rref in my board is 820Ohm, 820*3mA =2460mV) it works fine, but if i do like i show above i get error Voltage from ADC
for 0'=100Ohm i get 148mV ( proper value is 150mV). I get 150mV when i write Vref as a constant (2460).