[Home] [Solution - Stopwatch] [Solution 2]
Solution - Stopwatch
Up ]



  •  My solution can be downloaded and tested at the BASYS board:  Stopwatch.bit

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

    • [Btn1] = Lap time  - Will show the time until pressed again (Stopwatch runs in the background or can be stopped).

    • [Btn3] = Clear - Will only clear the Stopwatch when stopped.

The VHDL source code for Muxdisplay_ver3 can be found here: Muxdisplay_ver3.vhd


The Toggle_Button3 a State Machine which controlled by the "Button" input and removes eventually bouncing from the contact with a 4-bit shiftregister (not part of the State Machine).

The six internal states produces three outputs:
      Toggle:  Changes state for each press of the button.
      Deboun:  Will be "1" when the button pressed or else "0" (Debouched button)
      Pulse:      Like Deboun but will only be "1" for one Clk period after a press.



In order to use the 1 kHz frequency from the MuxDisplay and produce a 4-bit Bcd output with 1/10 of second resolution will this be a good component to have.

The "En" input controls the counter and Clear works asynchronous (hence the name). Rco will be "1" when the counter reaches 999 and En='1'


As the En input only will be high for one Clock pulse each second will this counter accumulate the Second-part of the time.

The same component used for the Minutes-part as well.

Rco will be "1" when the counter reaches 59 and En='1' otherwise "0"


This component produces a "Running light" at the leds in order to present the 1/10 of seconds.

Consider if this functionality should be placed elsewhere in the diagram.


In order to "freeze" the display for presentation of a Lap-time will the best solution properly be a x-bit Latch which allows the time-data to pass by under normal condition and hold the display each time the Latch high.


Just as an extra feature would it be nice to have the display-dots perform some kind of blinking in order to indicate the different states of the Watch.