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:
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.
|file: /Techref/io/led/matrix7seg8io.htm, 7KB, , updated: 2009/4/6 14:05, local time: 2018/12/11 00:08,
|©2018 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://www.piclist.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?|
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20181211 RussellMc, Van Horn, David, Sean Breheny, David C Brown, Neil, Isaac M. Bavaresco, Bob Blick, Harold Hallikainen, AB Pearce - UKRI STFC, John Gardner,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!