Home ] Up ] BCD to 7 Segm ] Mux Display ] Bcd Counter ] Toggle Button ] Stopwatch 1 ] Stopwatch 2 ] ALU Test ] Conversions ] [ The HiLo Game ]
The HiLo Game

Up ] Play The Game ] Game Simulation ] Diagrams and Components ]

Return to DIG #15
bullet

 Download the Zipped project and unpack in order to perform the exercises:  No10_HiLo_game3.zip


The HiLo game based at the principle of Successive Approximation - The same principle used in Analogue to Digital Converters.

 
bullet

First Download the bit file to your kit and "Play the Game"

   
 
bullet

Secondly Study the simulation in order to get better understanding of the principle

   
 
bulletYour allowed to mix Schematic and VHDL code - Most common will the top levels be Schematic and the components will be based at VHDL modules.  Study the Top Levels of the Game here.
   
 
bulletThe Button Detector needed for the Game must generate a Pulse at the Rising Edge of a (Debounced) button press
Study the code - Create code for Falling Pulse detection, Toggle Button and Debounced button outputs
   
 
bulletThe principles of successive approximation calls for binary numbers where as the presentations at the display calls for Bcd numbers - hence are a Binary to Bcd conversion needed.  
The conversion will take a number of clock-cycles and require handshake signals as well as Flip/Flops to hold the result of the conversions.
Study the code for the Display Driver - Create at Test Bench from Scratch (no help included)
   
 
bulletThe "brain" of the Game will be based at a State Machine in combination with one or perhaps two shift registers
Solve at least one of the two versions suggested    - Alternate version here
   
 

Extra tasks to solve

 
bulletMake a extended version where the number could be between 1 and 9999
   
 
bulletExtra enhanced version of the game:  Keep somehow count of the number of guesses needed and display both the the guessed number in say one second and then the number of guesses in two seconds.
   
 
bulletMake a reverse version of the Game, where the hardware generates a random number and its your challenge to guess the number.