Question
Consider a coin-operated vending machine. Assume that the machine accepts only quarters, dimes, and nickels. Coins are inserted until a total of 25 cents or
Consider a coin-operated vending machine. Assume that the machine accepts only quarters, dimes, and nickels. Coins are inserted until a total of 25 cents or more is deposited. Only one coin is deposited at a time. The input signals corresponding to each coin are given by I25, I10, and I5.
The output signal OM should indicate that merchandise should be provided. OM = 0 indicates no merchandise. At the same time as the last coin input (that makes the total amount 20 cents or higher), the change outputs are to be set. Assume that the machine can give a dime (O10 = 1) and/or a nickel (O5 = 1). Use the binary outputs O5 and O10 to represent the 4 distinct change possibilities: no change, 1 nickel, 1 dime, 1 nickel and 1 dime.
If a customer does something unwise (such as put in a dime and a nickel followed by a quarter), correct change does not need to be given, but the maximum amount of change must be provided.
Input Pins
Your input pins are the relevant coin signals, I5, I10, and I25. You will also need the clock pin Clock. There is also an input named Enable. Hook this up to the enable pins on your flip flops.
Output Pins
Your output pins are the merchandise output OM, and the change outputs O5 and O10.
Exception to Minimization
We are not going to learn how to do K-maps for more than 4 variables. Since a K-map for this FSM would require 6 variables, you do not need to minimize the combinational logic for this FSM.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started