> Date: Tue, 7 May 1996 10:09:17 +0000 > Reply-to: pic microcontroller discussion list > From: Gerhard Fiedler > Subject: Re: WDT problem > To: PICLIST@MITVMA.MIT.EDU > At 12:04 07/05/97 +0000, Ruben Jšnsson wrote: > >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? > > I recall having heard that in various other applications they had trouble > with this chip, and replacing it by the Maxim equivalent helped them. (You > say it's working fine, though -- they had trouble with it not giving a > proper reset pulse.) > > I had a quick look at a data sheet and it says "u" for the /TO bit at a > "/MCLR Reset during normal operation", which probably is your case. Are you > sure you don't reset it somewhere? > > Gerhard The dallas DS1233 works fine, It holds reset low as long as VDD is less than 4.5 V, and keeps it low for abt 300 ms after it goes above 4.5V. I also change the OPTION register (the data book says it is set to all ones at reset) to prescaler for RTCC and prescalervalue to 3. The data book also says that I should use CLRWDT before setting the OPTION register when changing the prescaler from WDT to RTCC but I can't do that because it also sets the *TO bit. Anyway the according to the databook both the prescaler and WDT is cleared during reset. I'm going to see wat happens if i save the *TO bit before I set the OPTION register and do the test on the saved bit instead. Still I don't think it has anything to do with how my program is done because it works most of the time. ------------------------------------ Ruben Jšnsson AB Liros Elektronik Box 9124 200 39 Malmš Sweden Tel +46 40 14 20 80 Mail: ruben@sbbs.se ------------------------------------