Well I've tried several things in keeping with this kind of thing too, but after a lot of wasted effort, I realized that the best solution is to write critical variables periodically to a SAFE area and then go get them when you power up. The cheapest way to do this is with a FRAMTRON I2C serial memory, you can write to them often without a problem. Just write critical variables into it say, every minute. I'd tried many elaborate schemes, one in which I post a byte that indicates which routine I am running normally (which is handy when diagnosing a broken or in production troubleshooting), but when the WDT triggers, something is WRONG and the data is meaningless. --Bob At 01:21 PM 7/14/2003 +0200, you wrote: > > I think this is my misunderstanding of WDT. > > > > If there is a product which is used in industrial area where > > there are pumps, and other machines that could mess up the > > operation of the software in a uc, how would one make a > > realiable product? > > > > In my case, the product I am working on works automatically > > until stopped. The user only needs to hit start and it does > > the rest. When there is pump/motor next to the unit, if it > > strong enough, it causes the sofware to restart or do weird > > stuff. How could I prevent this? I though I could use the WDT. > >my preference, in this order: >1. try to get rid of the root cause: more shielding, decoupling, do >somethiung about the motor itself, etc. >2. design your system so that it can start again without the user >noticing. if your system does time-sequencing things this might be >difficult, but for a system that periodically gets its setpoints over >some comms you could just wait for the next message >3. if things still go wrong you might start again from eeprom values, >provided that these are not corrupted. so store 3 times, and use >brown-out reset > >Wouter van Ooijen > >-- ------------------------------------------- >Van Ooijen Technische Informatica: www.voti.nl >consultancy, development, PICmicro products > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body --------------- NOTICE 1. This account can accept email & attachments up to 10M in size. 2. Federal Monitors: At request of client, some attachments are encrypted. Please DO NOT delay traffic; please reply with credentials for password. -------------- -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body