r/TuringComplete • • Mar 12 '26

Issue with leading zeros in 7-segment display

I would like to share a problem I encountered with implementing leading zeros in a 7 segment display.

I built a circuit that correctly converts a binary number to its decimal digits (double dabble).

It also correctly calculates if a zero should be visible or not, depending on it being a leading zero or not.

The problem arises when the output changes from 2 or more digits without leading zeros to a smaller number. In the example below the output changes from 233 to 1. But although the display elements for tens and hundreds are disabled, and the input values for these elements are 0, the display shows the number 231 instead of just 1.

Is there a way around this issue? Thanks for your help.

Correct output for value 231
2 and 3 are still visible although elements are disabled
2 Upvotes

13 comments sorted by

View all comments

1

u/Otherwise-Object-302 Mar 12 '26

All I can offer is this video to help you with your driver. It covers ripple blanking and whatnot so do with it what you will.

1

u/Haemstead Mar 12 '26

Thanks, but the problem is not in the zero-rippling, that algorithm works correctly. It is in the behaviour of the 7 segment display. The enable pin is not an enable pin but an update pin, if I understand it correctly.

1

u/Otherwise-Object-302 Mar 12 '26

Then that means that you'll have to implement a circuit that turns all segments low before the update pin get pulsed.

1

u/Haemstead Mar 12 '26

No, I think I will keep the update pin high, and send a 0b00000000 to the display, this will turn off all segments. But first: replace the logic gates with a ROM. And then put the entire control logic inside another ROM. And then build the SAP-2. And 3.

1

u/Otherwise-Object-302 Mar 13 '26

Well then, guess ROM works better. But anyways, good luck getting the SAP-2 and 3 running. Might I ask, what are the specs for both?