Designing and building the electronics of a vending machine. At minimum you will be responsible for 9 different inputs and 10 different LED outputs. Each input can be implemented with a switch or simple jumper wire and each output must be implemented with an LED. You will design a state machine for this system and then implement that state machine in software using the MSP430. You must use two 74LS377’s in a shift register configuration to display the output. The requirements for the project are below:
1. Accept and differentiate between money denominations (you will use switches to indicate what denomination was inserted). Signals must be properly de-bounced in software to prevent multiple entries. – 4 inputs
2. At least 4 selections should be available with the following price points: $0.50, $0.80, $1.10, $1.50 – 4 inputs
3. At any time (provided there is money credited to the user) a return change button should be able to reset the money counter while triggering an led to indicate change has been returned – 1 input and 1 output
4. Track how much money has been credited to the user using an 8 bit LED array (8 bits can display between 0 and 255, for this project we will assume that the total money credited is the decimal number divided by 100 ex: 135=$1.35) – 8 outputs
5. An indicator that not enough money is credited for a pushed selection – 1 output
6. System must keep track of inventory in the machine. It can be assumed that in the
initial state, the machine is full and there are five items for each of the four selector
7. Show that an item is out of stock – 1 output
8. You may only use two pins as outputs from the MSP 430 (Hint: think shift register)
9. You will make two versions of the final software. One will perform simple polling of the
input signals. The second will use interrupts to monitor the input signals.
10. Input signals must be pull high or low with internal resistors of the MSP430.
Fifteen cent coin-----P2.0
Sixty cent coin-----P2.1
Develop a state diagram, a state table, circuit diagram (to build on breadboard), and write a code to program the MSP430.