'Example, FVR = 1.024 and we are using 8-bit resolution; and say that the ADC result is 78; then,
'Vdd = (1.024 * 255)/78
'Vdd = 3.347 V

'Example, FVR = 1.024 and we are using 10-bit resolution; and say that the ADC result is 326; then,
'Vdd = (1.024 * 1023)/326
'Vdd = 3.213 V' When it comes to floating point, for accuracy, we can use DIV32 function.ADCRes = 1023 ' 10-Bit Resolution is 1023 steps.FVR = 1024 ' 1024 is actually 1.024V. This is required for DIV32 accurate calculation.PAUSE 100