On Mon, 10 May 2010, Dwayne Reid wrote: > > I'm really interested in hearing other people comment on this subject > - its a great learning opportunity. Regarding robustness, if you use a real state machine, you are better able to resume operation if an external event causes the MCU to lock up and the watchdog is able to restart it. Think of it as a watchdog event that can occure during any state. You would use this event to trigger a state change to a special state (which could be one of many such states) much like any other event used by your state machine. At the start of many of your states you initialise things like variables and output ports. In other states you update variables and output ports. You would tend to use the watchdog event to take you back to a state (in the current chain) that does the initialising or setting hardware to a well defined condition. Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist