Hi, Peu
NO, you did not understand ...
1) You enable BODEN, nothing else required ...
2) AT program start, you first read the BOR bit
3) If BOR Bit = 0 THEN (and only IF ) you increase the EEPROM content : That means power is back, and did not reach ZERO !!! ( no Pb to write , then ...)
4) If BOR Bit = 1 power has gone to ZERO ( and BOR bit has been reset ) ... just read the EEPROM content .
5) you SET BOR bit
6) you run your "lighting" program ...
Think simple !!!
Alain
Last edited by Acetronics2; - 12th March 2008 at 20:55.
Reason: BOR Electrical levels inverted ...
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks