Kerry, Cool. if they allow to reset the pic then it will work? very nice job Kerry.=A0 In my project I save the reset cause in eeprom and on reset I display it. I know its going to work CCS compiler Andre m: Kerry Wentworth To: Microcontroller discussion list - Public. Sent: Monday, October 10, 2011 12:38 PM Subject: Re: [PIC:] Distinction between RESET and BOWNOUT I can't say whether it will work or not, it would have to be tried.=A0=20 But, the idea is that in the startup code, you look to see if the reason=20 for the last reset was a brownout, or some other reason.=A0 If it was a=20 brownout, you know the battery is low.=A0 This assumes that the battery=20 has recovered enough to run the PIC.=A0 It seems likely enough, since all=20 outputs will be off after a brownout reset.=A0 If you have seen a=20 brownout, turn off brownout protection so you can continue to run, and=20 indicate that the battery is running low. Kerry Andre Abelian wrote: > Kerry, > > Brownout reset is directly connected to reset hardware and once it is ena= bled=A0 it will reset the pic. > > it is hard wire. the only thing you can do in software is disable/ enable= .. The voltage is set in configuration bits. > you can't sense and not allow to reset the pic like use it for battery in= dicator etc. "not going to work". > 16f684 is low end pic not much you can do with it. > > PCON.0 is status register you will know this bit is changed after resetin= g the pic > because of if this got set/clear it will reset the cheap. > > Andre Abelian > > > > > ________________________________ > From: Kerry Wentworth > To: Microcontroller discussion list - Public. > Sent: Monday, October 10, 2011 8:53 AM > Subject: Re: [PIC:] Distinction between RESET and BOWNOUT > > In software, you can only detect whether a brownout reset has occurred=20 > (PCON.0=3D0 if brownout reset occurred).=A0 The threshold is set by=20 > programming the word at 2008h, which is only accessible to the PIC=20 > programmer.=A0 It does not describe how the threshold varies with the=20 > value in 2008h, so some experimenting may be in order. > > Kerry > > > Andre Abelian wrote: >=A0=20 >> Kerry, >> >> How do you read brownout setting in software? >> >> AA >> >> >> ________________________________ >> From: Kerry Wentworth >> To: Microcontroller discussion list - Public. >> Sent: Monday, October 10, 2011 6:27 AM >> Subject: Re: [PIC:] Distinction between RESET and BOWNOUT >> >> Looking at the data sheet, I see some interesting features. >> >> Brownout can be enabled/disabled in software >> >> The brownout threshold can be adjusted during programming >> >> Brownout reset can be detected >> >> So theoretically, you could bump up the brownout threshold to a value=20 >> that would allow the PIC to continue operating for a while.=A0 If a=20 >> brownout is detected, leave brownout disabled and signal "low battery",= =20 >> otherwise enable brownout and operate normally. No hardware changes=20 >> needed to implement this. >> >> Kerry >> >> >> >> IB Peter Feucht wrote: >>=A0=20 >>=A0 =A0=20 >>>=A0=20 >>> Resend, tag added, sorry. >>> >>>=A0=20 >>> Dear Piccers, >>> >>> I developped a small battery operated device, using a 16F684, everythin= g >>> works fine. Now the customer shows up, and wants to have any sort of >>> batt-low indication. For already 1000 PCS are made and assembled, there= ist >>> no chance to make any hardware modifications. Even more, there is no ro= om >>> left on the PCB to add any components and I also have no PIC pins left = for >>> any batt voltage detection. >>> Now the 684 has an brown out reset, which is pricipally doing what I wa= nt, >>> but I see no possibility to distict between a "cold boot reset" (made w= hen >>> e.g. batteries are changed) and brown out reset. >>> In case of a cold boot reset the devide should work normally, but when = a >>> brownout occured, I'd like to simply disable any further operation unti= l new >>> batteries are inserted. >>> >>> Does anybody have an idea, know of any sort of "hidden features", any s= ort >>> of dirty tricks to make this? >>> >>> Thanks for any help. >>> >>> Peter >>>=A0 =A0=20 >>>=A0 =A0 =A0=20 > >=A0=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .