> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of Sean Breheny > Sent: 11 October 2011 04:27 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC:] Distinction between RESET and BOWNOUT >=20 > Hi Peter, >=20 > This variable that you are talking about - will this be stored in > EEPROM/flash or RAM? I think that RAM contents may be destroyed during > a brown-out condition. Probably not, but I wouldn't rely on it. >=20 > It seems to me that others have already mentioned that there are > status bits in the PIC which will tell you whether the last reset was > a power-on reset or a brown-out condition. Why not simply check for > this at every boot and if it was a brown-out reset, then do not > operate. Replacing the batteries will cause a power-on reset instead > and then you can resume normal operation. >=20 > Sean Even better if you can do something to cause a high current demand at start-up so you get a brown out before the main code starts executing. Mike =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .