Ternary clock

Make time frustrating

Similar projects worth following
A ternary clock display

After I had put together #Block clock I realised how easy it would be to augment the firmware to show the time in ternary (base 3).

As the display board doesn't cater for true ternary indicators like bi-colour LEDs, we have to make do with two side-by-side LEDs of different colours. So either one or two LEDs per trit (ternary digit) depending on the range. Next frustrating project I will get hold of some bi-colour LEDs.

Moreover true ternary for hours and minutes takes a bit of getting used to, so we'll take baby steps and make a Ternary Coded Decimal display this project. 0-9 requires 2+ trits, for 1, 3 and 9, so 5 LEDs (we only need one 9, not both). 0-5 requires 1+ trits for 1 and 3 so 3 LEDs (we only need one 3, not both). 0-2 requires 1 trit, so 2 LEDs. In summary, we need 8 LEDs for 0-59, and 7 LEDs for 0-23. This fits onto #An uninnovative linear LED display which can display two bytes.

The only modification needed to the #8042 clock firmware was to define a binary to TCD map which was generated by a short Python program, and an assembly option to enable this.

This ternary clock (trock) is also mounted on a block of wood. So maybe it's a Block Trock, or maybe Trockenblock, a little dry humour.

  • Encoding changed to pure ternary

    Ken Yap01/25/2023 at 10:46 0 comments

    I got tired of TCD (Ternary Coded Decimal) as you have to remember that there is an implicit digit separator before the 5th LED from the right. So I added pure ternary encoding.

    The top 6 LEDs display the hour, 2 LEDs per trit. Each trit is encoded by 0 = OFF-OFF, 1 = OFF-RED, 2 = YELLOW-OFF. Reading from left to right, the value of each LED is:

    18, 9, 6, 3, 2, 1

    The bottom 8 LEDs display the minute, 2 LEDs per trit. Each trit is encoded by 0 = OFF-OFF, 1 = OFF-RED, 2 = GREEN-OFF. Reading from left to right, the value of each LED is:

    54, 27, 18, 9, 6, 3, 2, 1

    All that was needed in the firmware was another assembly-time option, and another lookup table. I had to move and change some of the LEDs on the existing display board. I could have made another display board, but I don't intend to continue using the TCD display.

    It'll take a while to get used to reading ternary.

View project log

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates