> -----Original Message-----
> From: Ömer Yalhi [SMTP:
oyalhi
KILLspamTEKSAN.COM.TR]
> Sent: Wednesday, January 15, 2003 11:18 AM
> To:
.....PICLISTKILLspam
.....MITVMA.MIT.EDU
> Subject: Saving contents of a mcu to eeprom
>
> Is there a way to save couple of bytes (8 or 10 bytes) to eeprom just
> before power outage?
>
> * I am using MPLAB C18 (the software is in C)
> * The unit is working with 220V AC converted to 12V DC then 5V DC.
> * Configuration bit is set so power on reset on, brown out detection on,
> brown out voltage 4.2, oscillator H4 (10MHz xtal working at 40MHz).
>
> I looked up the datasheet, according to page 27, I checked the RCON
> registers POR bit (that is the only one affected with brown out for some
> reason) and saved 8 bytes to eeprom if the POR bit was 1. I did this at
> the very first thing in the main() procedure. However, it did not work.
> Any ideas?
>
> If anyone is interested the product can be seen at:
> www.teksan.com.tr/vana.asp?L=E&Id=0401
> or goto
http://www.teksan.com.tr, select product then bathcing solutions.
>
> Thanks,
>
> Ömer YALHI
> Check out the Low Voltage Detect (LVD) function. This is effectively a