Textbook Notes (290,000)
US (110,000)
LSU (20,000)
EE (300)
EE 2731 (60)
All (60)
Chapter

Coke Machined Code


Department
Electrical Engineering
Course Code
EE 2731
Professor
All

This preview shows pages 1-3. to view the full 18 pages of the document.
Vending Machine using Verilog
Ajay Sharma
3rd May 05

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

Contents
1 Introduction 2
2 Finite State Machine 3
2.1 MOORE.............................. 3
2.2 MEALY .............................. 4
2.3 StateDiagram........................... 4
3 Verilog Code of the Machine 6
4 TesT Bench 10
5 Output 14
6 Explaination of Output 17
1

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

Chapter 1
Introduction
Vending Machine is a soft drink dispensor machine that dispenses drink based
on the amount deposited in the machine. It accepts all the coins ie: Nickel(5
cents), Dime(10 cents), Quarter(25 cents). Till it recieves 40 cents it will not
dispense anything. After it has recieved 40 cents it will dispense a softdrink.
Any amount above that will be given back as a change.
The diagram below is the block diagram of the vending machine.The in-
puts are the coins and the output is the drink.
In the next chapter we will see the how we can encode the state machine
in a state diagram and draw it.
2
You're Reading a Preview

Unlock to view full version