PDA

View Full Version : Excel Tool for 7 Segment Displays



Balachandar
- 28th March 2015, 03:25
When we design a PCB for a project that includes a 7 segment display, the usual practice is to connect the port pins to the segments in the most convenient way to avoid or minimize jumpers. Then we calculate the byte values for displaying the digits, based on which port pin is connected to which segment. To simplify these calculations, I have created a tool in Excel; you merely enter the segment names (and the decimal point if needed) against the port pins 0 to 7. The Excel tool performs all the required calculations and provides the byte values separated by commas as a text string that can be just copied and pasted into the code.

If you are using 14 pin PICs like 16F676 which have only 6 pins per port, you cannot assign all the segments to a single port. But it is possible to split the segments between the ports. For example, in 16F676, you can enter segments a, b, c & d against pins that you can use from port A and hyphens for the remaining 4 boxes in the tool. You will get the byte values for port A. By entering the remaining segments against the available port C pins, you can get the byte values for port C. Hyphens are to be entered against port pins that are not used for the display.

The necessary instructions are given in the worksheet itself. The second sheet shows the pinout of common 7 segment display modules - single digit to 4 digits that you may find useful. The worksheet is protected in order to avoid accidental deletion or overwriting of any cell contents. If you would like to make changes in an attempt to improve the tool, you may do so after unprotecting the sheet.

File attached: 7-Segment Display Byte Value and Pinout.xlsx.txt (After downloading the file, rename it by deleting the ".txt" at the end.)

Your comments and suggestions are welcome.

Regards,
Bala

fratello
- 28th March 2015, 07:44
Thanks for sharing ! Regards !

Art
- 31st March 2015, 16:21
Nice idea! This is always a pain in the butt job.
I used to trace the port pins and convert to segments A-G&DP, blah.
I lately found it easier to cycle all byte combinations and wait for the right digits to occur!

Demon
- 31st March 2015, 17:10
Can someone attach the file as a XLS format for the old people who are on even older versions of excel?

Robert
:)

pedja089
- 31st March 2015, 17:29
Here it is
7753

Demon
- 31st March 2015, 18:05
Thank you!