When you want to make a large numeric display, the typical approach is to duplicate the 7 segment layout with a "matrix" of single, large, LEDs. For example:
000 0 0 0 0 000 0 0 0 0 000
This requires 7 io pins to drive; one output for each set of LED's forming a line segment in the 7 segment display. This method works, but it copies a disadvantage of the 7 segment system; those gaps at the ends of the segments. When making REALLY big 7 segment displays with lots of LED's per segment, it really isn't an issue, but as one moves towards a smaller display, using fewer LEDs, the problem becomes more obvious until it reaches a point with one LED per segment, at which the digits are almost unreadable. This example shows a medium sized display where the gap is just starting to be a problem:
Here is that same 7 when there is only 1 LED per segment:
It isn't really a limitation of having so few LED's because a perfectly nice set of digits can be produced with the same layout:
One might guess that the problem with this matrix "font" is that it will require more IO pins; one each for the 15 LEDs used for each digit. But an analysis of which LEDs are lit for each digit shows that some are always on, and others can be combined; in other words, when LED "A" is on, LED "B" will also always be on, so they can be driven as a pair by a single IO line.
If one labels each LED in the layout as follows:
ABC DEF GHI JKL MNO
And then uses the following "font" (note that these digits can be read unambigously upside down and right side up, i.e. 2/5 and 6/9 are not the same when rotated or reversed)
000 0 0 0 0 0 0 000 |
1 1 1 1 1 |
222 2 22 2 222 |
333 3 33 3 333 |
4 4 4 444 4 4 |
555 5 555 5 555 |
666 6 666 6 6 666 |
777 7 7 7 7 |
888 8 8 888 8 8 888 |
999 9 9 999 9 9 |
It turns out that certain patterns begin to emerge:
The end result is that you only need 7 IO lines to drive the display:
Here is the digit data in binary and hex:
AB | DG | F | H | J | L | MN | (hex) | |
0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 77 |
1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 12 |
2 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 5D |
3 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 5B |
4 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 3A |
5 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 6B |
6 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 6F |
7 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 52 |
8 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 7F |
9 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 7A |
The LED pairs will use a different drive current than the singly driven LEDs. As a result, more complex drive electronics or carefully adjusted resistor values will need to be used to ensure equal brightness.
This idea has NOT been tested in a real world application and any number of human errors may have been introduced.
This was developed by creating an Excel spreadsheet and importing the "font" on the first page, as fixed width text with one character per cell.
Excel is displaying the warning marks because the cells have been formated as text, and it is concerned that the cells contain numbers. Numerical digits were used to fill in the cells (rather than "X" or some other common letter) as a sanity check to insure the data for each digit was really what was being displayed on the next page.
A second page was opened and an =OFFSET fomula was used to copy the data from the first sheet into a different layout.
Here, each line describes a single digit, as indicated in the "P" column under the heading "#". Each column to the left contains the data copied from the first sheet for that LED in the digit. For example, on line 2 (for the digit "0") only LED's "E", "H" and "K" are not filled with data. All the other LED's have "0" indicating that they would be on.
This format makes it possible to look for patterns. Data can be sorted by any column or by the digit number ("P" column).
Patterns were found and the original data changed to further simplify the data. E.g. LED "A" was removed from digit 4, "G" was removed from 2.
Highlighting was used to show the patterns discovered: E and K are greyed out as they are never used. The columns in yellow are always on. The green columns go on in pairs.
A more sophisticated data analysis could be used for larger sets of data. A 3 by 5 set of LEDs can display a (barely) workable set of letters, symbols and numbers. It might be possible to drive this matrix with less than the 15 IO lines that would otherwise be required if even a few LED pairs could be found.
Digital logic might be applied to decode the input and decide what LEDs to light as is done in a binary to 7 segment decoder.
See also:
Decode
ABCD AB DG F H J L MN
0 0000 1 1 1 0 1 1 1
1 0001 0 0 1 0 0 1 0
2 0010 1 0 1 1 1 0 1
3 0011 1 0 1 1 0 1 1
4 0100 0 1 1 1 0 1 0
5 0101 1 1 0 1 0 1 1
6 0110 1 1 0 1 1 1 1
7 0111 1 0 1 0 0 1 0
8 1000 1 1 1 1 1 1 1
9 1001 1 1 1 1 0 1 0
AB (1011011111) = A + BD + B'D' + C
DG (1000111011) = A + BC' + BD' + C'D'
F (1111100111) = B' + C'D' + CD
H (0011111011) = A + BC' + B'C + CD'
J (1010001010) = B'D' + CD'
L (1101111111) = B + C' + D
MN (1011011010) = B'D' + B'C + BC'D + CD'
+
file: /Techref/io/led/matrix7seg8io.htm, 9KB, , updated: 2023/9/7 21:10, local time: 2024/12/22 21:40,
3.137.181.194:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.ecomorder.com/Techref/io/led/matrix7seg8io.htm"> Better "7-Segment" type digits from an LED matrix with 7 IO pins.</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to massmind.ecomorder.com! |
.