Sand:box

Sand:box

Not enough ratings
Create a segmented display
By 418: I'm a teapot
In this guide I will teach you how to build different types of segmented displays and all you need to know to get them to work for your projects.
   
Award
Favorite
Favorited
Unfavorite
Building the display
The very first thing you need to do is actually building the display. I recomend doing it with the electric view mode.



Begin by building a large glass rectange and build your design inside it with LCD material. You have to keep a few things in mind:
  • This guide only covers displays up to 8 segments due to game limitations.
  • The display will only work for numbers from 0 to 255 due to game limitations.
  • LCD material is conductive, segments can't be in contact with eachother. Diaglonal contact is fine.
  • There has to be enough space for all segments to be connected to a bus decoder (without touching).

This is an example of a common seven segment display:



Feel free to experiment with diferent numbers of segments and shapes. At the end of the guide I'll show some interesting configurations I found.
Building the electronics
Now you have to get the electronics set up.

First you have to connect all the segments to a bus decoder. It's lenght has to be at least twice the number of segments minus one (if you have 7 it would be (7 x 2) - 1 = 13). To be safe you can make it 15 pixels long and it will work with all displays. It also has to have enough distance for all the cables to reach it without making contact with eachother.



Then you have to wire every segment with the decoder. The transparent wire will not be visible in normal viewing mode so it's perfect for our use.

You will also need an addresable ROM conected to the bus decoder, altough you don't have to modify it yet.

Now that all the building is done, you can remove all the glass that you didn't need, being careful not to delete any wiring.

It should look something like this:


Creating the font
To create the font, each segment will be assigned a letter, A being the segment connected to the right of the decoder and following the sequence to the right. Following this order is VERY IMPORTANT for the next step. My example would be like this:



Now that we have a letter assigned to every segment you can create a table like this:

Num
A
B
C
D
E
F
G
Hex
0
1
2
3
4
5
6
7
8
9

We will fill it with ones and zeros to determine if that segment will be on or off for each number. The Hex column will be the resulting binary number in a hexidecimal base, we will use it later.



To provide an example, an 8 with the design I provided would have the segments A, B ,C, D, E and G on, so the table would look like this:

Num
A
B
C
D
E
F
G
Hex
0
1
1
1
1
1
0
1
7D

The table for my desing would look like this:

Num
A
B
C
D
E
F
G
Hex
0
1
1
1
1
1
0
1
7D
1
0
1
1
0
0
0
0
30
2
1
1
0
1
1
1
0
6E
3
1
1
1
1
0
1
0
7A
4
0
1
1
0
0
1
1
33
5
1
0
1
1
0
1
1
5B
6
1
0
1
1
1
1
1
5F
7
1
1
1
0
0
0
0
70
8
1
1
1
1
1
1
1
7F
9
1
1
1
0
0
1
1
73

This is the font I just created:


You can also add or remove rows to change the base (you could make 16 to display hexadecimal numbers for example)

Programming the ROM
In this section I'm assuming you are working with base 10. If you are working with another base multiply the numbers by your base

With that table created youcan now program the ROM.
First you'll copy all the hexadecimal numbers in order. Once they are in the ROM you can copy and paste them. Copy and paste all numbers 10 times, once done, copy them and paste those 100 numbers 10 more times. It'll look like this:

This ROM will only work for one digit. To display larger numbers you can stack three displays and create a ROM for the units, one for the tens and one for the hundreds.

For the units you'll use the one you just did.
For the tens you'll copy each number 10 times and then copy and paste that result 10 other times.
For the hundreds you'll just copy each number 100 times.

Once you have the ROMs you can already use your display!


[Display being used to display the temperature picked by a thermometer]


[Desplay being used for a calculator]
Other examples
This is a 6 segment display that excels in some numbers but does poorly in other ones.

This is another 6 segment display. It does better in overally consistenciy at the cost of resembling the typical 7 segment display


This is a 4 segment display, it has splited segments to get over the limitation of it being 4 segments.

Thank you for reading my guide, any feedback is welcome :D
16 Comments
TheEvilMelon 21 Mar @ 7:32pm 
I have a ROM beneath each series of bus decoders and they're connected by a bus to a temperature sensor. Am I supposed to have a ROM between them to distinguish units, tens etc.
418: I'm a teapot  [author] 20 Mar @ 12:02pm 
Are you sure you have put different ROMs in each digit? Keep in mind that temperature sensors give signed values (from -64C to 192C) so just connecting the temperautre sensor won't give the desired results
TheEvilMelon 19 Mar @ 4:05pm 
I feel like I'm missing something, when I try to stack the displays together to read from a temperature sensor they both end up being the same number as it's hitting the same address in both ROMs. Is there a bus decoder or something I'm missing? First time approaching anything like this btw
rehe66 2 Mar @ 7:17am 
teach me on how to master the digital electronics and stuff, please
BlitzXy 2 Jan @ 8:47am 
okay time for my college lv homework my teacher assinged
noah 8 Dec, 2024 @ 12:06pm 
where do i put the table?
KorrinP 9 Aug, 2024 @ 7:26pm 
most basic font in ROM:
(v|9]^r}
Hixber 21 May, 2024 @ 9:33pm 
all i know is da numbers
418: I'm a teapot  [author] 25 Mar, 2024 @ 7:32am 
If you look at the guide that game provides, you'll find:
"Temp sensor - functions up to 192C and down to -64C. Minus temperatures count down from 255. This is because buses are limited to 8bit values."

This means that it will output a signed value and you need to modify your display for it to be able to display it. It might be a fun challenge to figure out how to do it by yourslef!
peanut butter jelly 24 Mar, 2024 @ 12:59pm 
I made two digits (for units & tens) and they work... tho inadequately when I connect a thermometer. I'm not here to say complaints; rather say that doing it might be tricky if you do something like that first time (I'm sure I've mistaken something)