Previous

State Machine Example

The state machine in this example has four modes, which can be selected by two inputs: DIR (direction) and SEQ (sequence). DIR reverses the sequence direction; SEQ alters the sequence by swapping the position of two of the numbers in the sequence. When the machine is turned on, it starts in the initial state and displays the number 9. It then sequences to the next number shown, depending on the input. This sequence is summarized in the following table.

Table 7_1 State Relationships

SEQ
DIR
Sequence of Displayed Number
1
1
9 5 1 2 4 9 . . .
1
0
9 4 2 1 5 9 . . .
0
1
9 5 2 1 4 9 . . .
0
0
9 4 1 2 5 9 . . .

Conceptual descriptions show the state progression and controlling modes, but they do not clearly show how change conditions result.

Next