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.
Bookmarks