Hi all,
Im currently building an automotive project using a 16F876, and I'm nearing completion but one last thing is that I want the pic to sleep when it is not receiving power from accessory (+12v), so that the variables do not get erased when the car is switched off
the project contains an LCD which I also wish to shut down.

what is the best way to acheive this? would I have to run the 12v through another regulator or can it be done some other way?

code wise I guess I just use port change interrupt?