Sie sind auf Seite 1von 6

INTRODUCTION

(PART 1:CO2-A3)

A vending machine is a machine which dispenses items such as snacks, beverages, alcohol, cigarettes, lottery tickets, consumer products and even gold and gems to customers automatically, after the customer inserts currency or credit into the machine. In the project 2 for Digital Design subject, Ive given task to create vending machine program that selling variable products using the De2 Board and Verilog program using the Quartus software. Verilog is a hardware description language (HDL) used to model electronic systems. Verilog HDL is most commonly used in the design, verification, and implementation of digital logic chips at the register-transfer level of abstraction. It is also used in the verification of analog and mixed-signal circuits.

BACKGROUND THEORY

CHARACTERISTICS (PART 2: CO3-C6)

There are three sums of coin variable for the vending machine which are ten cents, twenty cents and fifty cents. There are also three variable prices for the products in my project which are RM1.20, RM1.50 and RM1.70. If coins inserted more than the price of the products, the balance of the money will appeared on the LCD of the vending machine and the vending machine is ready for next buying process.

METHODOLOGY

START

Insert coin No(If coins not enough to buy products)

Yes (if the coins enough to buy product)

Produc ts selecti on

Yes (if there balance of the coin)

Balance No (No balance)

END

METHODOLOGY EXPLANATION

1) Start The vending machine button is pushed on indicate that program and the vending machine is on and the customer is ready to insert coin to buy products 2) Insert coin The coins of 10 cents, 20 cents and 50 cents are inserted until sum of the coins enough to buy the products. The coins insertion is up to rm4.00 and after value of that which is RM4.10 the vending machine is not accept coins anymore. 3) Products Selection- After the coins are enough to buy the products which are RM 1.20, RM 1.50 and RM 1.70 the selection button will available to toggle up indicate buying of the products 4) Balance After the customer bought the product, there are balance coins if the customer inserted the coins more than the price of the product. If dont have any coins the vending machine operation will proceed to end of operation of buying. 5) End End of buying process and the vending machine program is ready for next coins insertion.

RESULTS AND DISCUSSIONS

SIMULATE THE CHARACTERISTICS (PART 2 CO4-C4)

There are six verilog programs which are combined together to make the vending machine program. These all programs are very important because without one of the program, the vending machine project will be affected. These programs are: 1) total_insert (main program) 2) lcd_test (lcd program) 3) lcd_controller (lcd controller program) 4) sevenseg (seven segment program) 5) frqdvr (frequency divider program) 6) bcd (bcd program) Besides of all the programs above there are also produced by the verilog program from Quartus II software to ensure the project succeeds. These are of them: 1) RTL (register transfer level) 2) FSM (finite state machine) 3) Pin Planner

1) Register transfer level (RTL)

The synchronous circuit of vending machine consists of two kinds of elements: registers and combinational logic. Registers synchronize the circuit's operation to the edges of the clock signal, and are the only elements in the circuit that have memory properties. Combinational logic performs all the logical functions in the circuit and it typically consists of logic gates. In the vending machine program the RTL shows that there are two inputs which are total_sen and balance while there output which are bcd1, bcd2 and bcd3.

2) Finite state machine (FSM)

FSM conceived as an abstract machine that can be in one of a finite number of states. The machine is in only one state at a time and the state it is in at any given time is called the current state. It can change from one state to another when initiated by a triggering event or condition, this is called a transition. A particular FSM is defined by a list of the possible transition states from each current state, and the triggering condition for each transition. In the vending machine program there are four state which are indicated by binary number 000000, 000001, 000010 and 000011. The FSM of the program functionally well and each of the state indicate Start, Insert Coins, Product Selection and End.

3) Pin Planner The Pin Planner provides a graphical representation of the target device, which allows me to easily plan, view, create, and edit pin assignments in the vending machine

CONCLUSION After all the works done, Ive learn a lot about the VHDL and the vending machine project make me gained how to create and edit the program, how to handle the problem about the program and all the VHDL waveform, RTL viewer and FSM will indicate the program I created succeed or not. While doing the program there a lot of problems and I solved it successfully. All the knowledge gained will be useful in industries nowadays and will be apply successfully after learn all about the program.

Das könnte Ihnen auch gefallen