@johncaipa The maximum range of the ADC when using the 11db attenuation is 0-~3V. A Li-Battery has a voltage of up to 4.2V. So you need a voltage divider. And then it does not matter, whether the range at its output is 0-1V or 0-3.3V. So take a resistor pair of 1MOhm(to battery) and 220kOhm, dividing by 5.4545, and use the basic range. Add a smal capacitor at the ADC input to GND to have a low impedance for the moment of sampling. That divider will draw a constant current of 2.5µA. If that is too much, you'll need a P-Mosfet to switch of the divider when not needed.