On Mon, Oct 10, 2011 at 4:00 PM, IB Peter Feucht wrote= : > Now the 684 has an brown out reset, which is pricipally doing what I want= , > but I see no possibility to distict between a "cold boot reset" (made whe= n > 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 until = new > batteries are inserted. > > Does anybody have an idea, know of any sort of "hidden features", any sor= t > of dirty tricks to make this? > http://ww1.microchip.com/downloads/en/DeviceDoc/41202F-print.pdf Section 12.3.7, Power Control (PCON) Register The Power Control register PCON (address 8Eh) has two Status bits to indicate what type of Reset occurred last. Bit 0 is BOR (Brown-out). BOR is unknown on Power-on Reset. It must then be set by the user and checked on subsequent Resets to see if BOR =3D 0, indicating that a Brown-out has occurred. The BOR Status bit is a =93don=92t care=94 and is not necessarily predictable if the brown-out circuit is disabled (BOREN<1:0> =3D 00 in the Configuration Word register). Bit 1 is POR (Power-on Reset). It is a =910=92 on Power-on Reset and unaffected otherwise. The user must write a =911=92 to this bit following a Power-on Reset. On a subsequent Reset, if POR is =910=92, it will indicate that a Power-on Reset has occurred (i.e., VDD may have gone too low). --=20 Xiaofan --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .