Quote Originally Posted by skimask View Post
My method for the backup is 'simple'-ish. Used it a number of times, works for me...
+5v normally powers the whole circuit except for the PIC. It also trickle charges a 3 cell pack of NiMH batt's thru a blocking diode and a current limiting resistor (I also have a jumper that adds another resistor in parallel if I need to do a manual fast charge for awhile, i.e. I let it run too long on backup). This 3 cell pack directly feeds the PIC. I tap off the main +5v line into a normal port and keep an eye on it. If I lose the main +5v line, I shut down other peripherals, drop the clock speed, and start napping until main power comes back up. A single PIC running off 3 AAA 650 mAh NiMH cells can run a long time in sleep / low power mode. Even looping on the internal low speed clock (~37Khz) draws so little current that the thing can 'sleep' for a solid week before I have to worry about.
Skimask, the "crazy flying tiger"...
Remember I'm in a project where I use a gun and a mag for a DIY lasergame.
I have a pic in the gun and a pic in the mag. When the mag is in the gun, it gets its power from it. When player needs to switch to the next virtual mag, he removes the 'physical' mag, clicks on a switch to cycle through his virtual mags and then reinserts the mag in the gun. I need some power supply in the mag while it is out of the gun, it cannot sleep because player interacts with the pic inside the mag while it is away from the main power supply. See?