Translating easy board design into easy code.

7-segment_finishedI’ve been working with some 7 segment displays lately.  I found an old computer on the side of the road and pulled a 3-digit display out of it.  The hundreds digit can only display a 1 and it has no decimal points.  After pulling it off of the board I find that it is a 16-pin module; one pin is common anode, one pin is the cathode for both segments of the hundreds digit, and the other 14 pins are cathode pins for one segment each.

I did some breadboarding with this module and was able to get things working pretty easily.  When I decided to do some PCB design things became more complicated.  For ease of programming I had connected all of the segments of the ones digit to PortD of an ATtiny2313.  I then connected all of the segments of the tens digit as well as the single pin for hundreds to PortB.  This setup makes for easy coding as each number you want to display can be stored as an 8-bit char and written directly the the Port for the corresponding digit.  The problem is that the board design to match this is not at all easy. Continue reading