Hi Low
-
Upload
carminda-ruiz -
Category
Documents
-
view
18 -
download
0
description
Transcript of Hi Low
Idea
Project: to implement a design on our FPGA’s and present it to the class.
Idea: To make a game called Hi Low. Hi Low is a card game. You guess to see if the next card will be high or low.
You can turn this into a drinking game… But I don’t know anything about that.
Download install software
Week 1 Finished
Download a simple program to the FGPA
Week 2 Finished
Design my state machine on paper and
in VHDL
Week 3 Finished
Interface with the Lights and the seven
segment LEDs
Week 4 Finished
Interface with the LCD and create symbols.
Week 5 Still working…
Add more games Later…. To do
Time Line
The State Machine
Resetstate
WaitState
CheckAnswerH CheckAnswerL
Done TotalRight
wrong wrongright right
Push button B0 Push button B1
State Machine
ResetState: HILO is displayed and next state is set to waitforinput
WaitForInput: waits for button B0 or B1 to be pushed. If B1 is push you guessed that the random number would be less so go to state checkanswerL.
State Machine
CheckAnswerL: checks your answer to see if its less. It then displays ‘HOHO’ and turns on the 4 green LEDs if you got it right. If you are right you go to TotalRight state. If you got it wrong go to Done state and ‘8888’ is displayed as well as the 8 red LEDs.
TotalRight: displays ‘HOHO’ if you got it right. Wait for push button BA to be pushed and go to Done.
State Machine
Done: wait for push button BB to be pushed and go back to ResetState.
Done to ResetStateDisplay ‘HILO’
TotalRight to DoneDisplay ‘HOHO’
GuessHigher
GuessLower
LEDs have different Values for reach state to help you follow the code