Quote Originally Posted by BobK View Post
Hi Emavil,

You could monitor the PICs voltage supply for a loss and as soon as the PIC sees the voltage dropping write the variables to the EEPROM built-in to the PIC. As soon as the power up occurs you read back the vairables as part of your INIT routine.

As for monitoring the power, I would put a 100uF capacitor on the PICs Vdd to ground and monitor the power coming into the power supply using something like an opto-isolator that will signal the loos of power coming in.

HTH,

BobK
thanks BobK,

yeah, an opto-isolator is a good option.

Do i need to waste one I/O just to monitor power loss. Is there a hardware built-in to 648A that automatically detects power loss so that i can power simple housekeeping. How long does it take to perform this simple housekeeping?

can u share to me a simple schematic for that opto-isolator solution?