Hades logoHades applet banner
Digital clock with BCD counters (settable)

applet icon

The image above shows a thumbnail of the interactive Java applet embedded into this page. Unfortunately, your browser is not Java-aware or Java is disabled in the browser preferences. To start the applet, please enable Java and reload this page. (You might have to restart the browser.)

Circuit Description

The same digital clock as shown in the previous applet, but with additional logic to set the time. The user interface consists of three switches, and is more or less typical for standalone digital clocks:

  • click the stop switch to reset the seconds counter and pause the clock
  • click the set_minutes switch to increment the minutes counter once per second
  • click the set_hours switch to increment the hours counter once per second
Again, the circuit is built from a cascade of six asynchronous, falling-edge triggered BCD counters with a simple trick to reset the counters at the corresponding times.

The counter for the lower seconds digit simply runs continously. The upper seconds digit counter, however, needs to be reset after 59 seconds to avoid counting to 99 seconds. This is achieved by connecting the asynchronous reset input of the counter block to its Z2 and Z1 outputs. Therefore, as soon as the counter reaches 60, it is immediately asynchronously reset and at the same time generates the carry to increment the minutes counter - which uses the same structure as the seconds counter.

The hours counters use the same trick to immediately asynchronously reset the hours after the hours reach the value 24. Because the reset is asynchronous and very fast, the user has no chance to see the wrong values (like 00:00:60 or 24:00:00) before these are corrected to the right values.

Print version | Run this demo in the Hades editor (via Java WebStart)
Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German)
Impressum http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/30-counters/80-digiclock/digiclock2.html