ECE 287 – Lecture 14 Finite State Machines - I
ECE 287 – Lecture 14
Finite State Machines - I
Announcements
• Next Quiz on Wednesday after Exam• Exam II – Nov 15th
• Last Day to Demo Labs – Nov 14th
• Project Oral Proposal - Nov 1st
Robot control START
Approach
Ask Name
Response?
Small Talk
Sense Compatibility?
Ask on Date/Contact
SUCCESS
False
True
False
True
False
True
1) System of inputs, outputs and states• Peter: Assume input for question and input
for if action complete
2) State Diagram
3) Encode States
4) State table
5) Build Circuit
State Machine Generalization
State
Combinational circuit
Inputs outputs
Current State
Next State
Example 2
Turn a light on every 4 cycles of a clock using a state machine
Problem Set
1. Build a finite state machine for the following state diagram:
A
B
G
In = 0
In = 0
In = 0
In = 1
In = 1
In = 1
Out = 1
Out = 1
Out = 0
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.