Design a vending machine following the given instructions. Implement the design in FPGA. Vending Machine is...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Design a vending machine following the given instructions. Implement the design in FPGA. Vending Machine is a candy dispenser machine that dispenses candy based on the amount deposited in the machine. It accepts the following coins: Nickel (5 cents), Dime (10 cents), and Quarter (25 cents). Till it receives 25 cents, it will not dispense anything. After it has received 25 cents, it will dispense a candy. Any amount above that will be given back as change. It has the following states State 1: RESET State 2: FIVE State 3: TEN State 4: FIFTEEN State 5: TWENTY State 6: TWENTY_FIVE - When the machine gets a coin, it jumps to the next state. For example, if it is in RESET state and it gets a Nickel (5 cents), then it jumps to the next state FIVE. Otherwise, it stays in the same state. After that, if it gets a Dime (10 cents), then it jumps to the state FIFTEEN and so on. When it gets more than 25 cents in total, it comes back to the reset state and the difference is given back to the user as change. Draw the state diagram for this problem. Design a vending machine following the given instructions. Implement the design in FPGA. Vending Machine is a candy dispenser machine that dispenses candy based on the amount deposited in the machine. It accepts the following coins: Nickel (5 cents), Dime (10 cents), and Quarter (25 cents). Till it receives 25 cents, it will not dispense anything. After it has received 25 cents, it will dispense a candy. Any amount above that will be given back as change. It has the following states State 1: RESET State 2: FIVE State 3: TEN State 4: FIFTEEN State 5: TWENTY State 6: TWENTY_FIVE - When the machine gets a coin, it jumps to the next state. For example, if it is in RESET state and it gets a Nickel (5 cents), then it jumps to the next state FIVE. Otherwise, it stays in the same state. After that, if it gets a Dime (10 cents), then it jumps to the state FIFTEEN and so on. When it gets more than 25 cents in total, it comes back to the reset state and the difference is given back to the user as change. Draw the state diagram for this problem.
Expert Answer:
Answer rating: 100% (QA)
Here is the state diagram for the vending machine described 5c RESET 10c FIVE 10c TEN 5c FIFTEEN 5c ... View the full answer
Related Book For
An Experiential Introduction To Principles Of Programming Languages
ISBN: 9780262045452
1st Edition
Authors: Hridesh Rajan
Posted Date:
Students also viewed these accounting questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
A psychologist shows a list of eight activities to a subject in an experiment. How many ways can the subject pick a first, second, and third activity? a. Identify the total number of objects n and...
-
The trial balances of two proprietorships on January 1, 2017, follow: Domic and Dasilva decide to form a partnership on January 1 and agree noncash assets that they are each contributing: All of the...
-
The following are selected transactions of Pendlebury Department Store Ltd. for the current year ending December 31. 1. On February 2, the company purchased goods having cash discount terms of 2/10,...
-
A lighthouse beacon alerts ships to the danger of a rocky coastline. a. According to the lighthouse keeper, with what speed does the light leave the lighthouse? b. A boat is approaching the coastline...
-
During registration at Tech every quarter, students in the Department of Management must have their courses approved by the departmental advisor. It takes the advisor an average of five minutes...
-
2.9.When gas is injected into a column of water, a liquid circulation pattern develops. Thus, upflow at a rate Q, (m/s) rises in the central core and downflow occurs at a rate Q, in the annulus. If...
-
Why Lowe's left Canada in 2022. What problems did they have since they arrived in Canada several years ago? How did the acquisition of Rona and Reno Depot impact Lowe's Canada's performance? What...
-
A digital call is an option that pays 0 below the strike price and one 1 above the strike price. A digital put is an option that pays 0 above the strike price and one 1 below the strike price. Derive...
-
Write an assembly code that compute the factorial of 3 numbers in variable num1 ,num2 and num3 and store the results in variable fact1,fact2 and fact3,(Hint:this all in one program not in separate...
-
Compute the CFFA in two different ways Balance sheet: Current Accounts -2009: CA = 4,400; CL = 1,500 -2008: CA = 3,500; CL = 1,200 Fixed Assets and Depreciation -2009: NFA = 3,400; 2008: NFA = 3,100...
-
Complete the table below to answer the following questions (use spreadsheet software): A psychologist wants to find out if there is any relationship between reaction time and age in adults. She...
-
Imagine you invest in a Treasury Bill in the primary market. Face value is $1,000, interest rate of the Treasury Bill is 2.5%, and the maturity date is 90 days. Which is the price of the Treasury...
-
1. As an employee of Wells Fargo, you have been asked by your supervisor to cross-sell. You are initially excited that there is an opportunity to receive more money, but it is not long after that you...
-
Given that all the choices are true, which one concludes the paragraph with a precise and detailed description that relates to the main topic of the essay? A. NO CHANGE B. Decades, X-ray C. Decades...
-
This problem is about references and aliasing. In Reflang, an expression like the following creates two aliases (class and course) to the memory cell storing the value 342: Modify the Reflang...
-
Write five examples of well-typed and ill-typed programs that use all the arithmetic expressions.
-
Extend the implementation of the AST for Arithlang to include an AST node for the negation expression Exp.
-
a. Find the Laplace transform of the given function. Use Table 2.2 when applicable. b. Confirm the result of (a) in MATLAB. \(\sin ^{2} t\) TABLE 2.2 Laplace Transform Pairs No. f(t) F(s) 1 Unit...
-
a. Find the Laplace transform of the given function. Use Table 2.2 when applicable. b. Confirm the result of (a) in MATLAB. \(t^{2} \sin \left(\frac{1}{2} t ight)\) TABLE 2.2 Laplace Transform Pairs...
-
a. Express the signal in terms of unit-step functions. b. Find the Laplace transform of the expression in (a) by using the shift on \(t\)-axis. \(g(t)\) in Figure 2.16 FIGURE 2.16 Signal in Problem...
Study smarter with the SolutionInn App