SPLat Logo

Finite State Machines - Make light work of complex functions

SPLat will be shutdown for the Christmas Holiday season from Thursday 20 December 2018 thru Sunday 6 January 2019. We will check emails periodically and will continue to process orders but at a slower pace. Santa hat

Program your own Finite State Machine using a SPLat Controller for only $29.00.

The EC1 "EasyOne", a 32-bit fully featured SPLat Controller with USB and true multi-tasking is a easy way to learn and a cheap way to build your project.

Finite State diagram

State Diagrams 3, the state circle

If I can have 2 events and 2 possible outcomes in a wait loop, I can also have 3, or 4 or more. All I have to do is add decision diamonds, one for each possible event. That could add up to rather a lot of diamonds. So what we do instead is condense each group of diamonds into a simple circle, as shown in figure 3. Once we have agreed on the meaning of that circle, it conveys just as much information as the two diamonds and connectors in figure 2. It takes less space but still shows the essential part of what we are trying to represent.

So what does this circle actually mean? It represents a place in program where the state machine sits and waits for one of any number of anticipatedHelpTip events. While the state machine is doing that, it is not changing any of its outputs. We say that the state machine is in a particular state. Conversely, a state is a place in the diagram where the state machine is waiting for one or more external events.

A state is represented by a circle. The events are represented by "directed lines" (lines with arrow heads), each labeled with the associated event. What I call events are often called exit conditions or transition conditionsHelpTip.

Note: Figure 3 is a state diagram, or at least a snippet of one.