A sequential circuit is to be used to control the operation of a vending machine which dispenses a $0.25 product. The circuit has three inputs (N, D, and Q) and two outputs (R and C). The coin detector mechanism in the vending machine is synchronized with the same clock as the sequential circuit you are to design. The coin detector outputs a single 1 to the N, D, or Q input for every nickel, dime, or quarter, respectively that the customer inserts. Only one input will be 1 at a time. When the customer has inserted at least $0.25 in any combination of nickels, dimes, and quarters, the vending machine must give change and dispense the product. The coin return mechanism gives change by returning nickels to the customer. For every 1 output on C, the coin return mechanism will return one nickel to the customer. The product is dispensed when the circuit outputs a single 1 on output R. The circuit should reset after dispensing the product. Derive a Moore state table for the sequential circuit, and for each state indicate how much money the customer has inserted or how much change is due.
ReportQuestion