According to the reference manual for the cyclone II FPGA board, we now need to allocate the pin number to the inputs and outputs.
For the push button switches, we use them to represent the input coins.
Key3: 1 pound key2: 50 penny key1: 20 penny key0: 10 penny
For the toggle switches, we use them to reset, cancel buy and choose product.
SW9: RESET SW8: Cancel buy SW7: product 150p SW6: product 140p SW5: product 120p
SW4: product 100p SW3: product 70p SW2: product 50p SW1: product 40p SW0: product 30p
For the seven segment display, it is used to display the price of the chosen product for the customer. And it is also used to display the change that should be returned to the customer.
For the eight red LEDs (LEDR[7] to LEDR [0]), they are used to indicate that the product has been dispensed successfully.
For the eight green LEDs (LEDG[7] to LEDG[0]), they are used to indicate that the changes.
No comments:
Post a Comment