There's been a lot of people wanting scrolling LED message systems, so I've added a tutorial about using a PIC to drive a matrix of 64 LED's - so far there's two sections to it, with more to come.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
philba said:This a usefull tutorial!
A couple of points/questions:
- Do you use a 150 ohm resistor for each row pin and none for the col pins? I think that's how you've done it but the text wasn't clear on that point.
- Doesn't the brightness of each LED in a row depend on the number of LEDs lit? The current through the row pin is limited to 20mA - with all LEDs in the row lit, each would see 2.5mA. But if only one was lit, it would see 20 mA. Using a row driver and moving the resistors to the col pins could mitigate this with no change to the code.
- It would be great to see a tutorial on a lower pin count version of this. maybe using power shift regs (like the TPIC6B595 or similar) but that's probably a somewhat different subject.
ok, now I'm confused. if the resistors are 150 and only one is lit in a row, won't the row pin see 13.3 mA (assuming 4V with Vcc of 5 and a Vf of 2V, exact number may be different). secondly, when all 8 in the row are lit, each column with a 150 resistor, wont the current through the row pin sum up to 8*13.3 unless it has a resistor in series?Nigel Goodwin said:It's already like that, each LED receives about 2.5mA, regardless of how many are lit - it doesn't matter which side the resistors go, as long as the software is written accordingly. As it stands, the resistors feed the columns, and the rows are switched by the multiplexing.
I hear you on that.As it stands it's designed to be as simple hardware as possible, it's hard enough work wiring 64 LED's anyway!
philba said:ok, now I'm confused. if the resistors are 150 and only one is lit in a row, won't the row pin see 13.3 mA (assuming 4V with Vcc of 5 and a Vf of 2V, exact number may be different). secondly, when all 8 in the row are lit, each column with a 150 resistor, wont the current through the row pin sum up to 8*13.3 unless it has a resistor in series?
Yes, I suppose that is a lot of work. Had you considered using an 8x8 matrix module?Nigel Goodwin said:As it stands it's designed to be as simple hardware as possible, it's hard enough work wiring 64 LED's anyway!
I think that's what I said. Nigel's point is that the duty cycle average is < the pin limit even if the instantaneous current is well above it. Note that he has no current limiting resistors on the rows. I would think > 100 mA pulse is risky and would design in drivers, though.Mike said:Nigel,
That looks like another nice tutorial. May I make a suggestion?
I think you could improve display brightness significantly at minimal cost or trouble while maintaining that 'simple' tutorial value.
The pin "sink" spec limits your row driver pins to 25-ma no matter how many column LEDs are turned on. Consider adding a 160-ma NPN driver to each row pin to utilize the full 20-ma "source" capability of your column pins.
Better yet, scan common anode rows with 200-ma PNP drivers and take advantage of the 25-ma sinking capability of each column pin.
Mike
You're correct.philba said:I think that's what I said. Nigel's point is that the duty cycle average is < the pin limit even if the instantaneous current is well above it. Note that he has no current limiting resistors on the rows. I would think > 100 mA pulse is risky and would design in drivers, though.
I believe he's using the current limiting resistors on the column pins and 'scanning' rows so he has the current limiting resistors in the correct place.philba said:This a usefull tutorial!
A couple of points/questions:
- Do you use a 150 ohm resistor for each row pin and none for the col pins? I think that's how you've done it but the text wasn't clear on that point.
- Doesn't the brightness of each LED in a row depend on the number of LEDs lit? The current through the row pin is limited to 20mA - with all LEDs in the row lit, each would see 2.5mA. But if only one was lit, it would see 20 mA. Using a row driver and moving the resistors to the col pins could mitigate this with no change to the code.
I agree but I think that's beyond the scope of Nigel's "keep it simple" strategy.- It would be great to see a tutorial on a lower pin count version of this. maybe using power shift regs (like the TPIC6B595 or similar) but that's probably a somewhat different subject.
Mike said:I think you could improve display brightness significantly at minimal cost or trouble while maintaining that 'simple' tutorial value.
The pin "sink" spec limits your row driver pins to 25-ma no matter how many column LEDs are turned on. Consider adding a 160-ma NPN driver to each row pin to utilize the full 20-ma "source" capability of your column pins.
Better yet, scan common anode rows with 200-ma PNP drivers and take advantage of the 25-ma sinking capability of each column pin.
williB said:I agree that there is no need that i can see to blank the display before updating it , did you see what it looked like without blanking it ?
maybe its worth a try?
I agree. There is nothing wrong with your design considering the scope of your tutorial. My Charlieplexed display experiments showed you could get 'decent' brightness by directly driving the displays.Nigel Goodwin said:Well, this has sparked some lively debate!
As for LED brightness, the scrolling numbers tutorial is clearly visible across the full length of the workshop - about 40 feet.
I believe you're going to need "source" drivers for the LED anodes. The STP16C596 and the ULN2803A are both "sink" drivers.bbarney said:1 just got some dual color 8x8 common cathode led matrix's and some STP16C596 16-Bit, constant current LED sink driver chips and some uln2803a my problem is how to wire all this together to a 18f2550 or a 18f4550.