I have an application that uses auxvcc1 and auxvcc2 for back-up purposes, in auxvcc1 is connected a supercap, and auxvcc2 is connected a battery.
And in my system the battery is not mandatory, is optional to the user. And the program should take different actions when it detects that a battery is connected or not.
My problem is that when the battery is disconnected I get unstable result, as I expected since the family guide states the any unused auxvcc should be connected to ground, and when the battery is not available this pin will be in high impedance (floating).
So my question is if someone have any suggestion in how to manage this, when the battery is disconnected I measured auxvcc2 and the voltage was 0.6V, but the flag AUX2OK keeps switching on and off.
Thank you very much,
Best Regards,
Leandro