Learn State Machines & Counters with the Basys 3 Stopwatch Challenge

Ready to put your digital logic knowledge to the test? We’re excited to share a project that brings fundamental concepts like state machines and counters to life using the popular Basys 3 FPGA development board. 

This isn’t just about theoretical learning – it’s about hands-on interaction. Imagine this: you press a button to start a timer displayed on the Basys 3’s 7-segment display. Then, with precise timing, you try to stop it at the exact moment a visual cue – the Basys 3’s LEDs filling up – indicates the target. 

This project is a good example of the kind of practical exercises students in digital logic courses can undertake. By working through this “Stopwatch Challenge,” learners can gain a deeper understanding of: 

State Machines: See how different states control the flow of the game. 

Counters: Observe how digital counters track time. 

Hardware Description Languages (HDLs): Understand how Verilog is used to implement these core hardware building blocks. 

Let’s break it down into steps: 

  1. Design a counter and use it to blink an LED ten times a second. 
  2. Design a basic state machine to enable and disable the blinking LED based on button presses. 
  3. For bonus points, debounce your buttons. 
  4. Modify your counter to count up or down, selected based on an input. Decode this counter and use it to drive the Basys’ LEDs. 
  5. Design a binary-coded decimal counter. 
  6. Design a seven-segment display controller and use it to display decimal numbers. 
  7. Modify your state machine to pull together these disparate parts into a game – enable the decimal counter when the game is started, pick success and fail states based on the state of the up/down counter when buttons are pressed, and clear counters (or not!) based on success/fail status. 

Here’s what you’ll need: 

  • A Basys 3 FPGA development board. 
  • A MicroUSB programming cable. 
  • The free Vivado design suite (compatible with the 2024.1 release). 

Ready to try the Stopwatch Challenge?  

https://digilent.com/reference/programmable-logic/basys-3/demos/stopwatch#functionality  

Whether you’re a student looking for a practical learning exercise or an educator seeking engaging lab ideas, this Basys 3 Stopwatch Challenge offers a compelling way to explore the fundamentals of digital logic design. Give it a try and see how precisely you can stop the timer! 

Authors

Leave a Reply

Your email address will not be published. Required fields are marked *