Total Views

Sunday, October 16, 2011

Finite State Machine and its Diagrams

Definition:
A State machine is a machine that has finite state (conditions) used to have some desired output. Basically a state machine is like a switch box that switches between states. It is defined with a FSM chart. 



Components of a State Machine:

A State machine chart is composed of the following components
  1. States
  2. Transitions
  3. Conditions
  4. Start and Stop states
Designing of a State Machine:
A State machine is designed with the following steps..


  • Step 1: Describe the machine in words.

In this example, we’ll be designing a 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, the controller checks the current floor and current input, changes floors and lights in the obvious way. 



  • Step 2: Draw the FSM Diagram:



  • Step 3: Simplify in the form of 0's and 1's:


  • Step 4: Draw the Truth Table:


  • Step 5: Draw the Big Picture View of the Circuit:



  • Step 6: Find all the Boolean Expressions:



  • Step 7: Draw the Simplified Circuit known as FSM :)

No comments:

Post a Comment

Translate

Search This Blog