Quote Originally Posted by BrianT View Post
Every time the battery goes flat the PIC18LF4620 scrambles the code space (and corrupts the bootloader) so I was going to try the BOR or the HLVD but the current draw is unacceptable. My next PCB layout will have ICSP pins so I can try the Code Protect option which I don't think allows a bootloader.

I think I am right in saying the PBP SLEEP command needs the WDT to be active so that sets a minimum current around 4.6 uA unless there is some other way of getting to the fabled 100 nA mentioned in the Microchip literature.
The '4620 has A/D. You could occasionally sense your own Vdd voltage with an extra diode or voltage divider circuit.
As far as the 100nA goes, I know microchip has a couple of really good app notes for that...I can't remember what or where they are though...