Question: Please write a vhdl code, all necessary files, and top level entity, use all the original inputs and their symbols Technical Objective: A state machine

Please write a vhdl code, all necessary files, and top level entity, use all the original inputs and their symbols
Technical Objective:
A state machine is sequential circuit that stores the status of something at a given time and can operate on inputs to change the status and/or cause an action or output to take place for any given change. In this lab, the design, coding and troubleshooting of a finite state machine will be investigated. To test the theory of designing with a state machine, a circuit to control the operations of a vending machine will be implemented.
Prelab (20\%):
1. Design a Vending machine controller that dispenses Red Bull drinks for \(\$ 0.75\). The specifications are as follows.
- The machine accepts dimes, nickels and quarters only. Only one coin can be input at a time.
- If the dispense button is pushed before there has been \(\$ 0.75\) input, it is ignored. If the button is pushed after \(\$ 0.75\) has been deposited, the machine outputs the drink and any change, if applicable.
- Once the total money in the machine reaches \(\$ 0.75\) or more, any further deposits are immediately returned to the user.
- If the coin_return input is pressed at any time, all money is returned.
- Two seven segment displays will always display the current balance in the machine.
- The inputs and outputs are as follows:
Dime In, Nickel in, Quarter in: these indicate that money is being deposited. These should be connected to three slider switches on the DE2 board. Coin return: This input indicates that the user would like their money back. Connect it to a slider switch. Dispense: This input indicates that the user would like their drink. This should also be connected to a slider switch. Clk: Since the 50 MHz clock on the DEO board is much too fast for this application, there are two choices. Connect clock to a pushbutton and manually clock the state machine Create a much slower clock in the design and clock the state machine at a 1sec. rate. Reset_n: this is the system reset and should be connected to Key0 Change back: this output indicates that change is being returned. It should be a red LED. Red Bull: This output indicates that the drink has been dispensed. It should be a red LED. HEX0 and HEX1: These are two seven segment displays. They display the amount of money in the machine.
Design Suggestions
Make an individual process for each output. Do not assign the outputs in your next_state logic process. The outputs must be a function of the state. You will need a separate process to keep track of the current money in the machine. This should be a clocked process since there is memory involved. Do not put this in the next_state logic process either. Changes to the money variable are determined by the state as indicated in the table.
State Money Red_Bull Change_back wait1 money = money 00 dime money = money +1000 nickel money = money +500 quarter money = money +2500 enough money = money 00 excess money = money 01 vend money = money -7510 change money =001
Please write a vhdl code, all necessary files,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!