What i suggest, have an i/o wich will cut/apply power to all external devices. Use a transistor/mosfet/realy to do it. OR since i/o can drive/sink 25ma, you can use some of them to do the job as well. 1 for LCD(VDD and contrast line), 1 for CMOS circuit, Pull-up resistors and so on for all the other things. Before go to SLEEP, set all i/o to input. By doing that, all supply will be remove to external devices.
Once you'll get out of SLEEP, just reset TRIS to normal state, add a little safety sake pause for the LCD start-up, Reset LCD flags FLAGS=0 and you're in business.

Originally Posted by
jessey
should I be tying all the unused pins to negative with the 10k resistors or would it make any difference?
it's up to you.

Originally Posted by
jessey
I also noticed that when I disconnect the negative to the Lcd (pin 1) the Lcd still works good?
that's possible, he take his ground from XYZ pins, contrast, data,r/w or else.
Some suggestions- For the pin 23, you can also just use a resistor in serie with VCC
- remove the relay and use only two diode. both cathode together as the VDD output, one anode to regulator, the other to the Battery. Cheaper, smaller and works!!!
hope this help.
Small reading from Microchip about power saving
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks