Menu

Theme

Projects · Project · CHECKED ON 5.0.0

Digital clock Logisim project: counters and displays

Use three Counter components: seconds and minutes count 0 to 59 (Maximum Value 59, wrap around), hours count 0 to 23. Each counter is enabled only when all the counters below it are at their maximum. A 64-word ROM turns each binary value into the segment patterns for two digits, so three identical ROMs drive the six 7-segment displays. In our test the counters printed all 86,400 seconds of a day correctly.
FOR
Students with a digital clock mini-project and 7-segment displays
CHECKED
12 Nov 2026
FIX TIME
about 2 hours
Checked against Logisim-evolution 5.0.0 on 1 machines
On this page

What you will build

A 24-hour clock, HH:MM:SS, on six 7-segment displays. Plan about 2 hours. You should know the Counter, ROM and the 7-segment display. The files are saved in the 5.0.0 format; we did not verify a classic 2.7.1 file. The self-test uses --tty table, which works in 5.0.0.

Design: counters, not clocks

The Clock component only produces ticks. Time is however many ticks you count: the seconds counter counts ticks, the minutes counter counts every 60th, the hours counter every 3600th. Each value then goes through a ROM that turns it into two digits for two displays. See clock and simulation for ticks and frequency.

Mod-60 and mod-24 counters

  • Seconds: a Counter with Data Bits 6, Maximum Value 59 and Action On Overflow set to Wrap around.
  • Minutes: the same.
  • Hours: Data Bits 5, Maximum Value 23, Wrap around.
  • One Clock on every counter, rising edge.

Chain the enables, never the clocks. Minutes count when the seconds carry output is 1; hours count when the seconds carry and the minutes carry are both 1. The carry output is 1 while the value equals its maximum (Counter page). A halt pin on the AND of the three carry outputs stops a command-line run at 23:59:59.

circ-digital-clock-counters · mainscroll to see all
666655clkclkCounterssclkssss_max0Countermmclkmmmm_max0mm_enCounterhhclkhhhh_max0hh_enss_maxmm_enss_maxmm_maxhh_enss_maxmm_maxhh_maxhalthh5bhhmm6bmmss6bsshalthalt
The three counters, the chained enables and the halt pin. The Clock is the only clock. CC BY 4.0 · SHA-256 9615bae6e0f4
Describe this circuit

Components: Clock 1; Counter ss; Constant 1; Counter mm; Constant 2; Counter hh; Constant 3; Buffer 1; AND Gate 1; AND Gate 2; Output pin hh; Output pin mm; Output pin ss; Output pin halt.

  • Clock 1 connects to Counter ss, Counter mm, Counter hh (net clk).
  • Counter ss connects to Output pin ss (net ss), 6 bits wide.
  • Counter ss connects to Constant 1, 6 bits wide.
  • Counter ss connects to Buffer 1, AND Gate 1, AND Gate 2 (net ss_max).
  • Counter mm connects to Output pin mm (net mm), 6 bits wide.
  • Counter mm connects to Constant 2, 6 bits wide.
  • Counter mm connects to Buffer 1 (net mm_en).
  • Counter mm connects to AND Gate 1, AND Gate 2 (net mm_max).
  • Counter hh connects to Output pin hh (net hh), 5 bits wide.
  • Counter hh connects to Constant 3, 5 bits wide.
  • Counter hh connects to AND Gate 1 (net hh_en).
  • Counter hh connects to AND Gate 2 (net hh_max).
  • AND Gate 2 connects to Output pin halt (net halt).

Test it: a whole day

Run --tty table on the file. It prints one line per tick (hours, minutes, seconds in binary) and stops at the halt pin.

Terminal
java -jar logisim-evolution-5.0.0-all.jar --tty table circ-digital-clock-counters.circ
0 0000	00 0000	00 0000
0 0000	00 0000	00 0001
0 0000	00 0000	00 0010
...
1 0111	11 1011	11 1001
1 0111	11 1011	11 1010
1 0111	11 1011	11 1011

Download circ-digital-clock-counters.circ and its descriptor (line count and SHA-256 of the expected output).

The mistake to avoid: a ripple clock

Do not clock the minutes counter from the seconds carry. In circ-digital-clock-broken-ripple-clock.circ we did exactly that.

7-segment displays from a ROM

7-Se1. Segment Ain 12. Segment Bin 13. Segment Cin 14. Segment Din 15. Segment Ein 16. Segment Fin 17. Segment Gin 18. Decimal pointin 1
The 7-Segment Display inputs, from our measured geometry (F44). crosshair = the loc Logisim stores
Ports as a table
#PortDirectionWidthOffset from anchor
1Segment Ain1(20, 0)
2Segment Bin1(30, 0)
3Segment Cin1(20, 60)
4Segment Din1(10, 60)
5Segment Ein1(0, 60)
6Segment Fin1(10, 0)
7Segment Gin1(0, 0)
8Decimal pointin1(30, 60)

The display’s eight inputs are the segments a to g and the decimal point; see the 7-segment page for the pin map. In the file, the Splitter ends map to a through g in order: the first end is bit 0, segment a.

The decoder ROM

A ROM with Address Bit Width 6 and Data Bit Width 16. For an address v from 0 to 59 the word holds the tens digit’s segments in bits 8 to 14 and the units digit’s segments in bits 0 to 6, with a = bit 0 and g = bit 6. Bits 7 and 15 are 0 (decimal points off). The patterns are 0 = 3F, 1 = 06, 2 = 5B, 3 = 4F, 4 = 66, 5 = 6D, 6 = 7D, 7 = 07, 8 = 7F, 9 = 6F. Addresses 60 to 63 are 0.

The decoder ROM, all 64 addresses (checked by test vector). The word is hex. For example 23 gives 5B4F.
#VWord
0x00x3f3f
0x10x3f06
0x20x3f5b
0x30x3f4f
0x40x3f66
0x50x3f6d
0x60x3f7d
0x70x3f07
0x80x3f7f
0x90x3f6f
0xa0x063f
0xb0x0606
0xc0x065b
0xd0x064f
0xe0x0666
0xf0x066d
0x100x067d
0x110x0607
0x120x067f
0x130x066f
0x140x5b3f
0x150x5b06
0x160x5b5b
0x170x5b4f
0x180x5b66
0x190x5b6d
0x1a0x5b7d
0x1b0x5b07
0x1c0x5b7f
0x1d0x5b6f
0x1e0x4f3f
0x1f0x4f06
0x200x4f5b
0x210x4f4f
0x220x4f66
0x230x4f6d
0x240x4f7d
0x250x4f07
0x260x4f7f
0x270x4f6f
0x280x663f
0x290x6606
0x2a0x665b
0x2b0x664f
0x2c0x6666
0x2d0x666d
0x2e0x667d
0x2f0x6607
0x300x667f
0x310x666f
0x320x6d3f
0x330x6d06
0x340x6d5b
0x350x6d4f
0x360x6d66
0x370x6d6d
0x380x6d7d
0x390x6d07
0x3a0x6d7f
0x3b0x6d6f
0x3c0x0000
0x3d0x0000
0x3e0x0000
0x3f0x0000

circ-digital-clock-decoder · mainscroll to see all
8166bVvROMseg2vwwu8t8u8u0u1u2u3u4u5u6u7t8t0t1t2t3t4t5t6t77-Seu_digitu0u1u2u3u4u5u6u77-Set_digitt0t1t2t3t4t5t6t7w16bW
The decoder: ROM, splitters and two displays. The 16-bit word is also an output pin for the vector. CC BY 4.0 · SHA-256 40c44c94b22b
Describe this circuit

Components: Input pin V; ROM seg2; Splitter 1; Splitter 2; Splitter 3; 7-Segment Display u_digit; 7-Segment Display t_digit; Output pin W.

  • Input pin V connects to ROM seg2 (net V, v), 8 bits wide.
  • ROM seg2 connects to Splitter 1, Output pin W (net w, W), 16 bits wide.
  • Splitter 1 connects to Splitter 2 (net u8), 8 bits wide.
  • Splitter 1 connects to Splitter 3 (net t8), 8 bits wide.
  • Splitter 2 connects to 7-Segment Display u_digit (net u0).
  • Splitter 2 connects to 7-Segment Display u_digit (net u1).
  • Splitter 2 connects to 7-Segment Display u_digit (net u2).
  • Splitter 2 connects to 7-Segment Display u_digit (net u3).
  • Splitter 2 connects to 7-Segment Display u_digit (net u4).
  • Splitter 2 connects to 7-Segment Display u_digit (net u5).
  • Splitter 2 connects to 7-Segment Display u_digit (net u6).
  • Splitter 2 connects to 7-Segment Display u_digit (net u7).
  • Splitter 3 connects to 7-Segment Display t_digit (net t0).
  • Splitter 3 connects to 7-Segment Display t_digit (net t1).
  • Splitter 3 connects to 7-Segment Display t_digit (net t2).
  • Splitter 3 connects to 7-Segment Display t_digit (net t3).
  • Splitter 3 connects to 7-Segment Display t_digit (net t4).
  • Splitter 3 connects to 7-Segment Display t_digit (net t5).
  • Splitter 3 connects to 7-Segment Display t_digit (net t6).
  • Splitter 3 connects to 7-Segment Display t_digit (net t7).

Download circ-digital-clock-decoder.circ and the memory image circ-digital-clock-seg2.txt (a v2.0 raw file). The ROM contents are also stored in the .circ, so they load with the file (ROM page). To make a table for your own bit order, use the memory image generator or the 7-segment decoder generator.

Put the clock together

The whole clock is the counters, three identical ROMs (the hours counter’s 5 bits are widened to 6 with a constant 0), the splitters and six 7-segment displays, hours tens first. The three ROM words are also output pins, so the self-test can check the decoding.

Download circ-digital-clock-24h.circ. The displays are laid out in one row at the top of the sheet.

Tick rate, run switch, set buttons, colon and stopwatch

Tick rate. In the window, Simulate, Auto-Tick Enabled (Ctrl+K) starts the ticks, and Auto-Tick Frequency lists 0.25 Hz to 2048 kHz with 1.0 Hz checked on a fresh start. The Clock component is high for one tick and low for one, so one rising edge takes two ticks. At 1.0 Hz our seconds Counter gained one count about every 2 s; at 2.0 Hz it gained one about every second and wrapped from 59 to 0.

Run switch, reset, set buttons and colon. Give the seconds Counter a run input on its Enable pin. The minutes enable is the seconds carry gated by run, ORed with a set-minutes button, and the hours enable is the minutes carry gated the same way, ORed with a set-hours button. Reset goes to the Clear pin of the three Counters. A button only advances its Counter on the next rising clock edge. The colon is the Clock signal ANDed with run, so it blinks while the clock runs and stays dark when it is paused.

circ-digital-clock-controls · mainscroll to see all
666655clkclkrunrunresetresetset_mset_mset_hset_hCountercnt_ssclkresetrunssss_max0runss_maxss_carryss_carryset_mmm_enCountercnt_mmclkresetmm_enmmmm_max0ss_carrymm_maxmm_carrymm_carryset_hhh_enCountercnt_hhclkresethh_enhhhh_max0clkruncolonhh5bhhmm6bmmss6bsscoloncolon
Clock counters with run, reset, set-minutes and set-hours inputs and a colon output. CC BY 4.0 · SHA-256 9800eef7366d
Describe this circuit

Components: Input pin clk; Input pin run; Input pin reset; Input pin set_m; Input pin set_h; Counter cnt_ss; Constant 1; AND Gate 1; OR Gate 1; Counter cnt_mm; Constant 2; AND Gate 2; OR Gate 2; Counter cnt_hh; Constant 3; AND Gate 3; Output pin hh; Output pin mm; Output pin ss; Output pin colon.

  • Input pin clk connects to Counter cnt_ss, Counter cnt_mm, Counter cnt_hh, AND Gate 3 (net clk).
  • Input pin run connects to Counter cnt_ss, AND Gate 1, AND Gate 3 (net run).
  • Input pin reset connects to Counter cnt_ss, Counter cnt_mm, Counter cnt_hh (net reset).
  • Input pin set_m connects to OR Gate 1 (net set_m).
  • Input pin set_h connects to OR Gate 2 (net set_h).
  • Counter cnt_ss connects to Output pin ss (net ss), 6 bits wide.
  • Counter cnt_ss connects to Constant 1, 6 bits wide.
  • Counter cnt_ss connects to AND Gate 1 (net ss_max).
  • AND Gate 1 connects to OR Gate 1, AND Gate 2 (net ss_carry).
  • OR Gate 1 connects to Counter cnt_mm (net mm_en).
  • Counter cnt_mm connects to Output pin mm (net mm), 6 bits wide.
  • Counter cnt_mm connects to Constant 2, 6 bits wide.
  • Counter cnt_mm connects to AND Gate 2 (net mm_max).
  • AND Gate 2 connects to OR Gate 2 (net mm_carry).
  • OR Gate 2 connects to Counter cnt_hh (net hh_en).
  • Counter cnt_hh connects to Output pin hh (net hh), 5 bits wide.
  • Counter cnt_hh connects to Constant 3, 5 bits wide.
  • AND Gate 3 connects to Output pin colon (net colon).

Stopwatch. A mod-100 Counter counts hundredths when run is high, its carry (gated by run) enables a mod-60 seconds Counter, and that carry enables a mod-60 minutes Counter. Reset clears all three.

circ-digital-clock-stopwatch · mainscroll to see all
776666clkclkrunrunresetresetCountercnt_csclkresetruncscs_max0runcs_maxcs_carryCountercnt_ssclkresetcs_carryssss_max0cs_carryss_maxss_carryCountercnt_mmclkresetss_carrymmmm_max0mm6bmmss6bsscs7bcs
Stopwatch: hundredths, seconds and minutes chained by carry, with run and reset inputs. CC BY 4.0 · SHA-256 54a0933071a3
Describe this circuit

Components: Input pin clk; Input pin run; Input pin reset; Counter cnt_cs; Constant 1; AND Gate 1; Counter cnt_ss; Constant 2; AND Gate 2; Counter cnt_mm; Constant 3; Output pin mm; Output pin ss; Output pin cs.

  • Input pin clk connects to Counter cnt_cs, Counter cnt_ss, Counter cnt_mm (net clk).
  • Input pin run connects to Counter cnt_cs, AND Gate 1 (net run).
  • Input pin reset connects to Counter cnt_cs, Counter cnt_ss, Counter cnt_mm (net reset).
  • Counter cnt_cs connects to Output pin cs (net cs), 7 bits wide.
  • Counter cnt_cs connects to Constant 1, 7 bits wide.
  • Counter cnt_cs connects to AND Gate 1 (net cs_max).
  • AND Gate 1 connects to Counter cnt_ss, AND Gate 2 (net cs_carry).
  • Counter cnt_ss connects to Output pin ss (net ss), 6 bits wide.
  • Counter cnt_ss connects to Constant 2, 6 bits wide.
  • Counter cnt_ss connects to AND Gate 2 (net ss_max).
  • AND Gate 2 connects to Counter cnt_mm (net ss_carry).
  • Counter cnt_mm connects to Output pin mm (net mm), 6 bits wide.
  • Counter cnt_mm connects to Constant 3, 6 bits wide.

Not tested

We checked the counting and decoding headlessly, and ran the counters in the window at 1 Hz and 2 Hz (F130). We did not read the six displays as digits in the window, did not run minutes and hours at tick rate, did not try tick frequencies above 2 Hz, and did not build a lap function. After opening a file in the window, click the canvas or press Ctrl+R, or the wires stay grey and the displays dark (F45).

Common mistakes

  • Ripple clocking. See above.
  • Maximum Value 60 instead of 59. The counter then has 61 states.
  • Hours with Maximum Value 24. It counts 23 to 24.
  • An hours counter with 4 data bits. It can only hold 0 to 15.
  • A ROM without its header line. A memory image needs v2.0 raw on the first line, or the load fails.
  • Overflow set to anything but Wrap around.
Clock counts correctly0 / 4 done

Downloads

Circuits: controls, stopwatch, counters, decoder, 24h clock, broken ripple clock. Memory image: seg2. Descriptors: the .vec.txt file next to each circuit. All are 5.0.0 files. To run a design like this on a real board, see the FPGA guide. Next: the traffic light controller, another state machine, or all projects.

Frequently asked questions

How do I make a digital clock in Logisim?

Count clock ticks with three Counters (seconds, minutes, hours), chain their enables, and decode each value to two digits with a ROM. Ours counted a whole day correctly (F121).

How do I make a mod-60 counter in Logisim?

Use a Counter with Data Bits 6, Maximum Value 59 and Action On Overflow set to Wrap around. It then counts 0 to 59 and returns to 0.

How do I show a two-digit number on 7-segment displays in Logisim?

Use a ROM with 16-bit words: the low byte holds the units digit's segments, the high byte the tens digit's. Our 64-word table passed a 64-row vector.

Can a Logisim clock keep real time?

Not from the Clock component: it only makes ticks. Time is the number of ticks you count. At the default 1 Hz tick frequency the Clock component gave one rising edge every 2 s in our run, so choose 2 Hz for one count per second (F130).

How do I make a stopwatch in Logisim?

The same way: a mod-100 Counter for hundredths, a mod-60 Counter for seconds and another for minutes, chained by carry and enabled by a run input. Ours matched a reference model over 12,000 test vector rows (F131). We did not build a lap function.

Is there a 555 timer in Logisim?

Not in 5.0.0 or in 2.7.1. Upstream notes one on its development branch; use the Clock component.

Sources

  1. Digital clock runs on Logisim-evolution 5.0.0, logisim.dev lab data: test-data/FINDINGS.md F121; src/content/circuits/circ-digital-clock-*; lab/circgen/build_dclock.py
  2. Counter overflow modes, logisim.dev lab data: test-data/FINDINGS.md F43

Try: , , ,