Tony Nixon wrote, quoting Alice Campbell: >> no, but it resets the tris and option registers to ones. > This should not occur for a WDT or MCLR reset. The TRIS registers > should remain as they were. The OPTION register does change to all > 1's though. Eh? Where do you make that out? We are talking 16C84 (or close enough) and table 4-1, page 13 of DS30081E gives a column for "Value on all other resets (Note 3)" which Note 3 indicates includes ~MCLR and WDR which is exactly the same for PCLATH, PCL, OPTION, TRIS as for POR. For the 12C5XX, same table, same page, document DS40139B. In fact, the only differences at all, are the ~TO, ~PD, and values which are "Undefined" on power-up are merely "Unchanged" on other resets. > If a MCLR reset occurs then the status bits TO and PD will not change. > If these bits were altered by some other event, eg. WDT timeout, then > on reset you may missinterpret these bits. > I don't know how you can distinguish a MCLR reset. It seems you can't unless you were asleep at the time. Am I right here?: ~TO ~PD 1 1 Power up; or CLRWDT then MCLR 1 0 Sleep was terminated by interrupt; MCLR then preceeded another CLRWDT (X84 only) 0 1 Code was interrupted by WDT 0 0 Sleep was interrupted by WDT -- Cheers, Paul B.