Hi,
Please correct me if I'm wrong.
From post #21, in the diagram, you have PB4 pulled up to 9v via a 10k resistor.
First problem is, relative to ground pb4 will be at 9v and 10k will pass 9/10k=0.9mA.
It's been known for pic's to be powered through their input pins, and 0.9mA is plenty if its running at 32khz.
Also 9v on an input referenced to ground will forward bias the intrinsic protection diodes.
You could clamp the pin with a zener to protect the micro but that would still draw power from your battery and still power the micro when you think it's off.
Also, if you thought it was working, setting the output pin to a 1 to keep the circuit powered, and someone comes along and presses the power on button, you now have a output pin shorted to ground
you'd need another series resistor to the input pin to protect it from a short to ground.
Just an observation
Mr Smiley