Searching \ for 'AW: [PIC:] Distinction between RESET and BOWNOUT' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: '[PIC:] Distinction between RESET and BOWNOUT'.

Truncated match.
PICList Thread
'AW: [PIC:] Distinction between RESET and BOWNOUT'
2011\10\10@092735 by IB Peter Feucht

flavicon
face
Hi,

thanks anybody for the hints, very helpful!

1. I read paragraph 12.3.5. but when 12.3.6. started with power-up stuff I
stopped readíng, power UP was not my problem. I learned: Better read some
pages more.

2. Some guys were discussing, if BOR is useful for battery detection. Yes,
you are right, if the circuitry is always operated in "full power mode". In
this case it will never leave the brown out condition. But in my device the
user starts the software by a key press, then it's operating for 15 or 20
minutes, consuming much power, but after that it goes to sleep mode,
consuming nearly zero amps. During this sleep the batteries may recover and
next time my PIC sees a "full" battery, but during operation the voltage can
go low again.
That's why I was looking for this distinction.

What I intend to do:

I have a variable which is reset by every cold boot (initialized to zero
when PIC starts).
When user presses the key, this variable is set to 1 (I assume that a BOR
will happen)
After normal operation (when no BOR happened) I reset this variable again
and the PIC goes to sleep.
So when it wakes up again, it sees a reset variable. Fine.
But when a BOR occured during operation, the software will never reach the
end of the software, thus the variable stays set and on next start the
software sees a set variable and based on this I can decide to disable
starting the software again. Just blink some leds and go to sleep again.

Anyone did this before? Hopefully I have some time tonight to write the
software.

Best regards

Peter

2011\10\11@193014 by Mark Hanchey

flavicon
face
On 10/10/2011 9:26 AM, IB Peter Feucht wrote:
> But when a BOR occured during operation, the software will never reach the
> end of the software, thus the variable stays set and on next start the
> software sees a set variable and based on this I can decide to disable
> starting the software again. Just blink some leds and go to sleep again.
>
> Anyone did this before? Hopefully I have some time tonight to write the
> software.
>
> Best regards
>
> Peter
>
>

The way I handle this is to monitor the status of the reset and if it ever indicates that the fault was due to
a power failure then the software sets a bit in the eeprom and powers off. On power up the code checks this bit, if it is set then the device will beep 3 times to give the user the chance to press a keypad button telling the device the battery is changed, if pressed  the bit is reset and the device functions like normal. If no key press then the device powers off.
This also has the advantage of alerting the user to the reason why the device turned off last time when things like good batteries but corroded terminals, loose fitting batteries were the problem.


Mark

2011\10\13@033611 by IB Peter Feucht

flavicon
face
Hello, all together,

I wrote the software yesterday evening and it seems to work!

Thanks for all the input!
Best regards

Peter

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...