14. Example 2
Turn a light on every 4 cycles of a clock using a
state machine
15. Problem Set
1. Build a finite state machine for the following state diagram:
In = 0
In = 1
In = 0
B
Out = 1
A
Out = 0
In = 0
In = 1
G
Out = 1
In = 1
16. Problem Set
1. Build a finite state machine for:
•
Design a state machine controller for an elevator. The elevator can be at one of two
floors: Ground or First. There is one button that controls the elevator, and it has two
values: Up or Down. Also, there are two lights in the elevator that indicate the current
floor: Red for Ground, and Green for First. At each time step (clock), the controller
checks the current floor and current input, changes floors and lights in the obvious way.