Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5. Draw a Finite State diagram that implements soda vending machine and derive the state logic table for a machine that has the following

image text in transcribed
Question 5. Draw a Finite State diagram that implements soda vending machine and derive the state logic table for a machine that has the following Environmental/Operational constraints: A soda costs 15 cents and the machine accepts nickels and dimes. We have an input sensor to detect nickels (bit 0) and input sensor to detect dimes (bit 1). We choose the wait time in each state to be 20ms, which smaller that the time it takes for the coin to go through the sensor. Waiting in each state will debounce the sensor, preventing multiple counting of a single event. We wait in all states, because the sensor may bounce both on touch and release Each state will have a function to execute. The function soda will trigger the port F output so thata nickel is returned. Similarly, the function change will trigger port F output so that a nickel is returned. The M states refer to the amount of collected money, When we are in a W state, we have collected that much money, but we're still waiting for the last coin to pass the sensor. Example: We start with no money in state MO. If we insert a dime, the input will go to 10 (in binary), and our state machine will jump to state W10. Evolve

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

Why do you think most employers opt for the home-based salary plan?

Answered: 1 week ago