SMART Group - Surface Mount and Related Technologies

State machines unveiled

  • 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 thing

However, I am a novice at such things and have not implemented them with any elegance.

In an attempt to get better, I came across two website which have helped clarify things.

Majenko’s Hardware Hacking Blog introduced me to state machines that interact by one changing the state for another – this sounds like a recipe for exploding complexity, but the example given is beautifully clear and compelling.

Norwegian Creations has an insight into the (arcane, I claim) differences between Moore and Mealy state machines, for which I am grateful, but does go on to deliver an Arduino example whose table-based approach I am struggling with.

Thanks Majenko and Norwegian Creations.

If any kind soul wants to further my education, links to suitable resources would be appreciated.

Article source: https://www.electronicsweekly.com/blogs/engineer-in-wonderland/state-machines-unveiled-2017-11/