1 / 10

Vending Machine Using FSM

Vending Machine Using FSM. Aalapee Patel Seth Martin. Objective. Dispense the product and the change if there is any depending on the customer input in terms of the money and the selected product. Special Cases. Machine is out of money Customer enters wrong product code

kyla-gordon
Download Presentation

Vending Machine Using FSM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Vending Machine Using FSM Aalapee Patel Seth Martin

  2. Objective Dispense the product and the change if there is any depending on the customer input in terms of the money and the selected product.

  3. Special Cases • Machine is out of money • Customer enters wrong product code • Any particular product is out of stock • Customer provides input in wrong order i.e. enters product code before money • Customer does not provide enough money

  4. Conditions/Constraints • The vending machine will contain products worth prices that are divisible by 5 i.e. $0.70, $1.00, $1.45 etc. • Customers are allowed to enter a maximum of $5 total as input. • Denomination for input and output(change) : $0.05, $0.10, $0.25, $1.00 and $5.00.

  5. Finite State Machine With Output Definition : Q - Set of states S - Start state which is an element of Q Sigma - Set of input symbols Pi - Set of output symbols Delta - Maps a state and a symbol from Sigma to a state and a symbol from Pi Note : It has no set of final states but has set of output symbols.

  6. Mealy and Moore Machines • In Mealy machine, the outputs are a function of the present state and the value of the input. • In Moore machine, the output depends only on the present state.

  7. Example Mealy and Moore state diagrams for '10' sequence detector : Ref: faculty.kfupm.edu.sa/COE/abouh/Lesson4_5.pdf

  8. Design for vending machine Start

  9. References 1) Finite State Machines : http://en.wikipedia.org/wiki/Finite-state_machine 2) Mealy Machine : http://en.wikipedia.org/wiki/Mealy_machine 3) Moore Machine : http://en.wikipedia.org/wiki/Moore_machine

  10. Questions ?

More Related