Hi Champs,
The datasheet states that the analog value of the ADC is calculate as follows:
Analog Value = a+k * ADC_OUT; ADC_OUT being 0 to 255.
when we do the math to measure the supply voltage (channel 2) we end up with a maximum measurable voltage of 20,5693 V:
0.0673 V + 0.0804 V/LSB *255 = 20,5693 V.
which is way below the possible range for the supply (40V).
Are we missing anything?