Hi BTlab,
Why don't you just write your variables to eeprom just before the power to the PIC dies then read them back into your program when the PIC powers up again? Use the READ and WRITE commands. You should also have an input that monitors the incoming power supply and put a 100uF capacitor across the PICs power to keep alive long enough to store the variables in memory. I believe there have been previous questions about this on the forum in the past.
HTH,
BobK
Bookmarks