The same time alone in the car solidified my thinking about the bus architecture I want to use to get the control lines from the microcontroller to the 16-channel LED drivers.
Each digit of the clock will have 28 LEDs, plus two for inter-digit colon and one for decimal point; hence 32 channels / two driver chips per digit. Probably six of those banks in the whole clock, for HH:MM:SS or MM:SS.TH, depending on the operating mode.
I’ve settled on this plan: Each digit will be independently addressed. The two A6276 chips within each digit will be chained together in serial, but all the different digits will fan out in parallel. That means strobing 32 bits of font data for every character change, which is (1) the minimum required, because that’s how many it takes to change the data anyway; and (2) a nice maximum, compared to strobing all 192 every time.
Here’s where it gets fun, and where my time spent growing up studying 8-bit microprocessor circuits pays off. It takes three lines (data, clock, and latch) to operate a series-chain of 6276es, so at first glance this plan looks like an 18-line architecture; and that’s more pins than I have available on the PIC18F2322 LogoChip.
But the way the drivers work, it doesn’t matter what’s in the serial-in buffer until you enable the latch to that chip, which captures the serial-input buffer it into the parallel-output buffer. Ergo use a single data/clock output pair from the LogoChip to all the characters at once, and only use six separate lines for the latch controls. Yeah, it seems a little odd to deliberately shift meaningless data into all the chips all the time, but there’s really no harm in it. Tee-hee.
It boils down to having a system-wide data bus with enable lines to select which chip listens, which is how every multichip computer (even the ones old enough for me to comprehend their design ) is built.
I’m even going to be a good boy and check the fanout, to make sure the LogoChip can drive that many 6276 inputs (or whether I’ll need to interject a buffer).
I’d like to start drawing out the circuit in EAGLE, but it doesn’t have a library entry for the 6276, and I haven’t checked on the DS1302 and DS1340 yet. I’ll probably have to design symbols for them.
Another set of questions revolves around whether the entire display will be a single ~2″ x ~12″ PCB, or a set of adjacent smaller PCBs that tie together. I kind of like the aesthetics of a single PCB; I kind of like the maintainability of smaller PCBs that permit swapping out single digits if LEDs fail, which gets the clock running again quickly. Hm, if I did do that, I’d want some kind of test harness that was ready and waiting to plug in and drive the lone digits.
Either way, I picture laying out the board as individual modules, with a control bus that extends across the entire width. Then the design isn’t dependent on the decision, and we can make it pretty late in the process.
One other consideration is manufacturing the PCB. I had assumed I’d use EAGLE; but of course the free version only edits boards up to about 3″ x 4″, which wouldn’t be nearly big enough for the full board. Maybe it’s time to learn to use FreePCB, which has always been my plan for laying out larger boards.
Also, I assume I’ll hand-draw and hand-etch the board rather than have it produced commercially, and my friend Joel’s drilling machine only has a travel of about 12″. If the display board is monolithic, I might have to produce drill files such that I could drill half the length of the board, flip it end for end, and drill the other half. I obviously wouldn’t get perfect alignment, but I think I could get close enough to be satisfied. It’s still a significant extra hassle, as is coming up with a much larger etching tank than the plastic case I’m currently using.
Ultimately, though, I want to make as many decisions as possible based on what’s right for the project, not what’s easiest to get away with. I don’t feel bad about DIY frosting the narrow-angle clear LEDs, because I think the result is about the same. But that’s not true of the difference between a single long board and a bunch of plug-in modules, whichever way we decide would be better.