E2C6A1/330799 NAME:
Digital Design 2/25/2019
Examination # 3
Write your name at the top of this page now
This examination is OPEN BOOK and OPEN NOTES.
Write all your answers on the examination in the space provided. You may use the back of the
examination for extra space. Partial credit will be given, but you must justify your work. If you do
not understand a question, ask. It will be to your advantage to read the entire examination before
beginning to work.
The examination will end exactly 72 hours after it begins. Good luck.
State Diagram: /25
True table: /25
VHDL module: /25
Simulation: /25
Total: /100
Designing a Vending Machine
Design a digital controller for the vending machine shown in Fig.
The vending machine has the following features (textual description):
- The vending machine sells just one type of product, and each product costs $0.25;
- Only $0.25 coins are accepted;
- A valid $0.25 coin weights 5.670 g;
- Invalid coins are rejected automatically, and the control circuit does not need to do anything
about that;
- There is a slot to insert 50.25 coins in the vending machine;
- There is a coin detection circuit that outputs '1' every time a $0.25 coin is inserted in the slot,
or '0' otherwise;
- There is a digital scale that outputs ‘1’ when a weight of 5.670 g (or more) is detected;
- There is a “delivery button” that outputs ‘1’ every time it is pushed;
- There is a “coin return button” that outputs ‘1’ every time it is pushed;
- There is a “coin return cup” to collect coins ejected by the “coin return button” (and also
rejected coins);
- There is a door where the user can collect their product, after have pushed the “delivery
button”;
- When the vending machine runs out of products, it shuts itself, and the control circuit does not
need to do anything about that.
Signature: __________________________________