Re: ADC conversion when the VDD is not fixed
Or you may make your own comparision using one or two ordinary diodes in series,
and a pull-up resistor (10 kOhm) to Vdd,
The diodes connected such that they conduct current in the forward direction to Vss.
Measure the voltage at top of the diodes at connection to pull-up resistor.
With ordinary ADC voltage measurement at this point,
and Vref voltage still at Vdd, ADC measurement will be higher, when battery voltage is falling.
You may do some math, and some calibration to determine voltage from the battery.
The result will be influenced by temperature also.