pic microcontroller discussion list <> wrote on Tuesday, July 15, 2003 4:06 PM: > That makes sense. But when the PIC comes back from a brownout, how > do you know whether it was: > > 1) A temporary power failure, and now everything is ok vs > 2) A power source in its death throes There are better ways, but you could count the number of reboots, and power down completely after X brownout-induced (or WDT-induced) resets. For example, increment a counter in EEPROM as first thing on boot and set it back to a start value when the PIC has been running for 10 seconds. If there are too many brownouts in quick succession, and the counter overflows, power down gracefully. Whatever you do, you need to do the checking before driving extra current (setting outputs etc) to reduce the chance of an infinite reset-loop Nigel -- Nigel Orr, Design Engineer nigel@axoninstruments.co.uk Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT Tel:+44 1467 622332 Fax:+44 1467 625235 http://www.axoninstruments.co.uk