PDA

View Full Version : An Excel tool to get the byte values for 7-segment displays



Balachandar
- 24th October 2018, 11:36
When we design projects with 7-segment displays, we simplify the PCB design by connecting any pin of the port to any segment of the display. When we do that, arriving at the byte values for the digits to be displayed becomes a time-consuming job. In order to make life a bit easier, I created an Excel file which comes quite handy in those situations.

In the file, you merely have to enter the segment names (including the decimal point) against the port pins and voila, the byte values are calculated immediately and you can copy and paste them directly into your code as text along with separating commas. Whether the display is Common Cathode or Common Anode, you get the byte values for digits 0 to 9 as well as digits A to F. Necessary instructions are given on the sheet itself.

There are plenty of formulas and no macros in the worksheet. In order to prevent accidental overwriting of any formulas, the sheet is protected. This means that you can wok on the file without any fear of deleting or overwriting any formulas, but you are allowed to enter segment names in 8 cells and no entry is allowed anywhere else. If you want to make any changes or improve the tool, you can go ahead after unprotecting the sheet (Review, Unprotect Sheet).

Sheet2 of the file shows the pinout of the most commonly available single and multi-digit displays which you may find useful.

To facilitate uploading the file, I have renamed it as "7-Segment Displays - Byte Values and Pinout.txt". After downloading the file, you have to rename it as "7-Segment Displays - Byte Values and Pinout.xlsx" to open it as an Excel file.

Do let me know your comments and suggestions.

Dave
- 24th October 2018, 16:32
It is a very useful application. It would be even better if you could add the lower case letters "c,h,i,n,o,r,t,u" and the upper case letters "H,L,P". I have used these letters in multiple digit displays for interpreting information displayed.

sayzer
- 24th October 2018, 20:25
I had made something like this a few years ago.
This is V1.0.


V2.0 makes detailed output.

Balachandar
- 25th October 2018, 03:09
It is a very useful application. It would be even better if you could add the lower case letters "c,h,i,n,o,r,t,u" and the upper case letters "H,L,P". I have used these letters in multiple digit displays for interpreting information displayed.

Thank you Dave. I feel happy to know that you find the tool very useful.

You have given me a good idea to come out with Version 2 of the tool. In addition to the letters you have mentioned, I am thinking of including certain patterns too, of course keeping in mind the constraint that there cannot be any diagonal lines.

Bala

Dave
- 25th October 2018, 13:19
I almost forgot, an upper case "U" would also be nice. That way one can spell "FUEL" or "FULL". Looking forward to the new version...

Balachandar
- 25th October 2018, 15:23
I almost forgot, an upper case "U" would also be nice.

Well, you can also add these to the list of upper case letters: G, J, O and S. I have seen letter 'M' represented by segments e, a and c. It's an approximation, but not a bad one; by the same logic, it's also possible to represent 'W' by the segments f, d and b.

Dave
- 25th October 2018, 22:00
Nice work Bala....