Those projects were just tests. Now I'm doing a project that I'm actually going to print PCB's and create enclosures for and make several of them as gifts for people (it's a chess clock with two timers). So I want to make sure I'm doing it right. I suspect I'm not. :) I have the project breadboarded right now. What I'm doing is this: Hook up two 74HC595N shift registers to +5V and GND, and three digital pins on the Arduino. I connect one register's QH* to the next registers serial input. Then in the Arduino I shift out 16 bits to set the shift registers pins. I have twelve of the shift register pins hooked directly to the 12 pins on the LED. Since I can only drive one digit at a time, I iterate through them quickly - leaving each digit on for only a split second, then displaying the next digit, etc. So, for instance, since I have a common anode LED, I'll turn the pin for the first digit high, then the pins for each of the segments of that digit that I want to display low (with the other segments high).
Okay, I have some questions:
- One: cycling through the digits rapidly leaving each on for only a split second: that's the only way I see to drive a display like this. Is that the correct way?
- I don't have any resistors hooked up to the LEDs. With a typical LED, I have to hook up a resistor. Do I need a resistor on this thing?
- If I do need a resistor, do I need one for each anode?
- Also, how do I calculate the resistor to use for this display?
- Any other tips?
The display is already pretty dim - I'm not sure if it's just a dim display, if I'm not driving it correctly, or that's just a function of the digits all being at approximately 25% duty cycle since I'm iterating through them many times per second. I adjust the length of time that each digit stays on a little bit. Too long and you see each digit fade away. Too short and it's blinking at you. There's a definite balance where each digit appears to the eye to be "constant".