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

Up ] Toggle_Button3 ] Watch_Counter ] TeenthSec ] Blinking ] Lap_TIme_Latch ] STATEM1 ]

Return to DIG #11
State Machine based solution

The functionality of the Stopwatch now defined by a FSM (Final State Machine) with 5 or more states.

bullet

[Btn0] = Start / Stop  - Will control the Stopwatch.

bullet

[Btn1] = Lap time / Clear  - Will show Lap when running or Clear if stopped (examine the state diagram for more details)

bullet

[Btn3] = Reset - Used only in case of problems with the state machine

 
bullet

Download and try out the design at your kit: Bitfiles_etc_Stopwatch_ver2.zip - Hint source-files included.

bullet

Download the complete project here:  No04_Stopwatch_Ver2.zip - Hint source-files and solutions

 

 
bullet

Consider your own state diagram design or try the State Diagram below and implement as STATEM1

(1) Write your own code for the STATEM1
(2) Create a Test Bench which performs a complete test of all states and transitions.
(3) Synthesize the version 2 of the stopwatch and download to the kit for testing.