Question: 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

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 \(\sim 1\mathrm{sec}\). 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
o 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. 2. Write the VHDL for your vending machine controller. Synthesize the design and correct any errors or warnings. Do not ignore latch warnings. Open the state machine in the netlist viewer and verify that the state transition diagram matches your original.
3. Submit the following to the dropbox prior to your lab section:
a. The VHDL code
b. The state transition diagram generated in the netlist viewer. To generate the state transition diagram, choose Tools > Netlist Viewers > State Machine Viewer
Technical Objective: A state machine is

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!