Thanks - that helps.
I'm really asking if bringing MCLR low can cause any problems with the code in the pic. How much does it "reset"? I understand I need to supply 13v to put it into programming mode - I just want to make sure holding the MCLR low over a long period won't cause corruption to the code, and if I'm correct in assuming this will insure a "reboot" when I next start the pic.
Actually, what I'm trying to do is create a single momentary tact switch that turns the whole system on and off. A very small draw during "off" is fine, but I want to shut down as many current consuming devices as possible.
My volt pump draws about .08 mA idle with no load and the sleeping pic draws almost nothing (nano-watt model).
1. My first thought was to just sleep the PIC when the power button is held for 1 second, turn off all the LED's and main components, then just let the volt pump continue to feed the PIC it's sleeping current, which will draw down the battery but will take weeks to do so, which isn't a major problem with this application.
But then I wanted to get creative and see if I could shut down more....
2. My volt pump has a SHDN pin - bring it low and it stops pumping, and draws almost zero current, the output however drops back to 1.5v (single cell battery) rather than going to zero. I assume 1.5 v is enough to shut the PIC all the way down, but I want to make sure it really totally resets for the next power-up.
I don't have the schematic to post, but I'm feeding the compoenents temporarily via a diode line that comes off my tact switch, once the PIC powers back up, it'll power it's own reset pin and the hold the SHDN pin of the volt pump high, and brace all of this with a small cap so there's no dips and spurratic resets.
When "power down" happens, I'll just turn off this "life line" pin then sleep the following instruction - in theory, the brace cap should discharge causing the volt pump to shut down (it's SHDN pin pulls low), and the same line now pulls MCLR on the pic low to insure it's "reset" for the next power up.
Maybe that's over complicated, but that's the best solution I could come up with for using a single tact switch to function as a "power" for the whole system.
Bookmarks