SPLat Logo

Finite State Machines - Make light work of complex functions

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

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.

Flow chart representation of a state

State Diagrams 1, the wait loop

The type of programs we are talking about here are reactive programs. They are programs that react to events with apropriate responses.

The conceptually simplest way to make a program react to an expected event, say an input turning on, is to have it sit in a program loop waiting for the event to happen. We call this a wait loop. In an old fashioned flow chart format the wait loop is drawn as shown in figure 1HelpTip.

You read this little diagram as "The program will get to this point. Then it will sit and wait until the input comes on, then it will continue".

Note: Figure 1 is not a state diagram. It is a snippet of an older form of diagram called a flow chart. I am starting with that because a lot of people already know flowcharts.