Small Number Display, colored

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Post Reply
Ecconia
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu May 10, 2018 5:26 am
Contact:

Small Number Display, colored

Post by Ecconia »

Ages ago I created a simple 7-Segment display (4*7) as it can be found everywhere.

But yesterday I saw, that one can easily build small compressed pixel displays (3*5) for number usage.
So I immediately put everything I learned into one build:
Screenshot from 2019-11-02 12-59-19.png
Screenshot from 2019-11-02 12-59-19.png (2.64 MiB) Viewed 2222 times
As shown on the image, it displays 32bit numbers without (known) issues.
Zero will always be printed white, while optionally positive numbers can be printed green and negative red.
Changing the colors, just means exchanging the same color signal in two components.
Toggling the colors is just toggling a constant-combinator.
Currently it takes the 'V' signal as input.

----

There is nothing new or super about this display, except that it contains all the already common known features.
-> Size: 3*5 with 1 block padding, vertically tileable.
-> Colors: positive and negative numbers can have different colors, zero is always white.

----

How it works:
- Each digit has 15 lamps, each has one signal (A-O). There is one "dictionary" constant combinator, which contains all data to display the pixels.
The constant combinator also holds the signals (A-O) and each is a bit-representation of all possible pixel states.
Each lamp checks if its corresponding signal is negative, which equals a most-significant-bit (sign bit) check.
For all signal the highest bit, is set to print the digit 0. The next highest bit contains the digit 1 (in each signal). Etc.
The Dictionary in this build/blueprint goes up to hexadecimal (0-F). The display however is tuned for decimal.
- Each digit has its 15 lamps and a shifter, to grab the correct pattern from the dictionary.
- To get the current digit from the number, an arithmetic combinator performs "mod 10" to get the lowest decimal digit from the number.
That number will be divided by any of 10^n places in another arithmetic combinator, so that the lowest digit is always the current digit.
-> Advantage of doing this instead of only using "/10" and chaining, is that all lamps update at the same time.
- A side effect of dividing this way is that for zero's which should not be printed the signal on the output of the divider will not exist, for visible zeros however its a signal with a count over 9 but with the last digit 0. Using this effect, a constant combinator checks for the signal to exist, is so the dictionary will be forwarded to the shifter, else not. No dictionary at the shifter means, no image.
- If the input is negative it will be converted to positive. (Using two decider and two arith [*1, *-1]).
- For the color two combinators check for the sign of the input and output 'Z' and 'Y' for >0 or <0. This gets sent to the other side of the display.
On the sign side of the display, the two signals 'Z' and 'Y' will decide whether the color from the constant combinators will be forwarded unto each display.

----

Inspiration:
- From the CPU on YT which performs Quicksort, I first saw such a small display. I was amazed by how the same signals had been used for dictionary and shifting information. However it uses a voodoo way of separating a decimal number into digits. I prefer /10%10. But it tough me how a dictionary works.
-> EDIT: I found out that the Display used in the video has its origin in this thread: viewtopic.php?f=193&t=19825
- Some YT video which explains how to build a Clock. It also used a dictionary, but it mainly helped me to understand the other display by just mentioning "binary", which made me investigate the numbers in the previous display on its binary level.

----



Youtube video with explanation:
https://youtu.be/xqWcd8lP8QE

Hope its to your liking, feel free to use it :)

~Ecconia
Factorio API doc is my sworn enemy who keeps me raging! One day I will delete/defeat you!

Post Reply

Return to “Combinator Creations”