When a process has to be coded, I like state machines because: the diagram stage enforces pondering the process in detail (and anyone smart enough to do a state machine without a diagram?) testing the resulting code can easily be broken in to chunks If you use a PIC, you can do the neat add-to-programme-counter-and-jump-into-table …
This story continues at State machines unveiled
Or just read more coverage at Electronics Weekly