So don't sleep! Sounds to me like the 'mag' is going to be fairly simple anyways. It'll take a LONG time to deplete a few AAA batts.

->Who is talking about depleting batteries? It is only for a short time (while the mag is pulled out and reinserted a few seconds later) and during this time, the PIC in the mag has to continue running.
Let me explain, when I'm talking about BACKUP it is not like the one for the CMOS in a PC.
I need to switch temporarily from a supply from the GUN (good battery with a voltage regulator) to another one (3 mini batteries onboard the mag).
The mag still needs to run when I remove it from the gun unit. I want to use small wristwatch batteries to supply power to the mag while it is out of the mag.
Do you understand?

By the way, mag is not simple at all, the managment of this little ******* fills all the 1048 words of the PIC...