Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment Using Logisim , design a circuit for a vending machine. Your vending machine should have four money inputs which can be triggered with a

Assignment

Using Logisim, design a circuit for a vending machine. Your vending machine should have four money inputs which can be triggered with a button (one each for nickel, dime, quarter, and dollar bill). Be sure to clearly label which button corresponds to which coin input. After a coin is inserted, the amount of the coin should be added into a register which stores the sum of all coin values inserted so far. You can setup the register to immediately add the input value by wiring the button push into the clock input of the register, and setting the register to update on the falling edge of the clock. In order to actually add the coin value to your sum in the register, you may use an adder from the Logisim library. You should not allow the total coin entered to exceed $5.00. Any coin inputs which would cause the total to go over $5.00 should be discarded. Your register should store an 8-bit value.

Additionally, add a button for buying a product. For now, assume only one product is available for purchase at the cost of $1.00. Clearly label which button will buy a product and what the cost is. When this button is pushed, the cost of the product should be subtracted from the total amount inserted into the machine. Do not worry about error checking in this assignment assume that the user has input enough money to buy the product (we will take care of this in the next lab).

Display the amount of money which has been inserted into the machine with either a Hex Digit Display. Optionally, you can convert the value to decimal value and display it using a 7-Segment Display. This display must also show the amount of money to be returned. Finally, add a reset button which the user can push in order to reset the value in the register to 0. Label this button. Perform extensive testing on your finished circuit to make sure that it performs as described above.

Hints

You can use as many registers as you need to for temporary storage, but a single register will suffice.

Registers (which are composed of flip-flops) will update with the input clock signal. You can change how the register updates in its properties. However, the clock input does not have to come from an actual clock, and you may find it easier to use the signal coming from your coin and product selection buttons to drive the registers clock input.

Remember to subtract the amount of the product.

Represent money internally in 5 cent increments; that is, $1.00 should be represented as 20 and $5.00 should be represented as 100.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions