[SOLVED] Verilog- Lab 9: Vending Machine

25.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (4 votes)

In this lab you will design a vending machine controller. The vending machine dispenses a single item that costs a quarter (¢25). The machine accepts nickels (¢5), dimes (¢10), and quarters (¢25) only. When enough coins have been inserted, it dispenses the item and any due change.

You should base your design around an FSM controller. The FSM should have the following inputs and outputs: Inputs:

  • c5, c10, c25: for nickel, dime, and quarter respectively
  • item_taken: to indicate the item has been taken after being dispensed
  • You can use other inputs if you want

Outputs:

  • dispense: indicating an item should be dispensed or has been dispensed

(this signal can be used to control the mechanical parts)

  • r5, r10, r20: for return nickel, dime, two dimes.

(these signals can be used to control the nickel and dime coin dispensers)

Once an item has been dispensed and taken, the FSM should start accepting coins for another item.

FPGA Implementation:

Implement your machine on the FPGA board, use the different push buttons to simulate the c5, c10, c25, and item_taken inputs.

Show the r5, r10, r20 on different LEDs.

The seven-segment display should display:

  • The total amount inserted
  • The amount of change due (when the amount inserted exceeds a quarter)

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.