Hello all. I have a problem with the Watch Dog Timer (or the *TO bit in the status register) in a 16C57. When the program is reset by a power up or a WDT timeout it does a selftest of all used instructions, the RTCC and the WDT. The WDT timer is tested as follows: The first time at power up (*TO=1) the selftest routine checks all instructions, the RTCC and writes 0x12345678 into 4 ram registers. It then does an endless loop broken only by the WDT, which in turn calls the selftest routine again. This detects that it is a WDT timeout and checks if the 4 ram registers contain 0x12345678. If they do it knows that this was an intentional WDT timeout and resets the registers again (so an unintentional WDT is detected) and returns. If there is any faults detected or it was an unintentional WDT timout it goes into and endless loop and indicates this on a LED output. This all works fine - mostly! The problem is if I turn the power off and on again quickly (VDD goes down to about 2V), then sometimes the *TO bit is cleared at power up so the selftest routine thinks that it was a WDT timeout and goes into the error loop because the 4 ram registers are not 0x12345678. I use a Dallas DS1233, 5V reset circuit which gives a nice and clean 300 ms reset pulse on MCLR at power up but this doesn't seem to help. The *TO bit is sometimes cleared anyway. I don't know how to deal with this problem, I can't just clear the WDT at reset because then I can't test it. Is there anybody else that has had similar problems and perhaps even solved them? Regards ------------------------------------ Ruben Joensson AB Liros Elektronik Box 9124 200 39 Malmoe Sweden Tel +46 40 14 20 80 Mail: ruben@sbbs.se ------------------------------------