Using 74HC595 to drive 8 X 8 LED Matrix
beazleybub
Posts: 102
Hi,
I'm learning about multiplexing and·DOT matrix displays and have purchased some 74HC595's.
Can I drive a small 8 X 8 DOT·matrix using the propeller and one·74HC595 similar to the schematic below without worry that I will draw too much current from the prop?
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/19/2010 6:54:58 AM GMT
I'm learning about multiplexing and·DOT matrix displays and have purchased some 74HC595's.
Can I drive a small 8 X 8 DOT·matrix using the propeller and one·74HC595 similar to the schematic below without worry that I will draw too much current from the prop?
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/19/2010 6:54:58 AM GMT
Comments
Where is the schematic?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
The other thing is that with an 8x8 display that is only 16 pins which only uses half the pins on a propeller, so no real need to use an HC595 (unless, of course, you are wanting to learn about those chips).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
You could try using a CHIP dedicated to the task such as..
www.newark.com/austriamicrosystems/as1107pl/led-driver-ic/dp/59P3692
They are half the price of the MAXIM equivalent ( MAX7219 ??)
available in DIP & SMD
All you need is one resistor to set the overall brightness/current, and only 3 lines from the prop chip
I have a design using the AS1108 which is a 4 X 8 Matrix.
regards
Dave M
You're right, I am trying to learn about the 74HC595 chip
I'm using a 24 pin bi-color 8 X 8 but for now I only plan on using 16 of them.
DavidM,
I·have samples coming from MAXIM and some from TI right now.
Thanks everybody for the quick replies! It's great to know there is some helping hands here [noparse]:)[/noparse]
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/18/2010 6:46:40 AM GMT
I have a similar project here that I ended up throwing ULN2803 on after the shift register just to be safe. I think I was looking at sinking worst case 20ma per LED in my matrix = 160ma per column worst case.
Maybe you might get 2 or 3ma per led, and that could work for high brightness displays, although you then lose brightness with the multiplexing. A small signal transistor like a BC549 will give you up to 100mA and there are other transistors that can go to 800mA or more.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
·· Just for reference, it is even possible to omit the current limiting resistors and any line drivers (and normal EE principles) and just drive the 8x8 LED directly from 2 (two) 74HC595 chips.
·· One acts as the column driver, the other as the row driver.· The propeller is isolated from any overcurrent.· The spin program consists of a· repeated 16 bit shift into both chips and requires 3 lines.
·· The brighntess of the LED's are normal and look the same as when 100 ohm resistors are used.· In my case the resistance of the breadboard and hookup wires provides enough current limiting.· This circuit has been running in various forms for months on different boards and has no problem even when the multiplexer is stopped and a single column gets the full duty cycle.· Here 4 rows of 8 are on to see contrast.
·· thank you
·· /michael
You can do it easily, and you can show video in 256 gray scale with that !!!, I did it in static scan, the task here is to do that in 1/8 scan. But I used two cogs for that task, anyway my ENC28J60 board can do that. (here's a picture)
Also you could use a led driver chip, like the MBI5024/5026 or the TB62726 (I did not test that with the TLC5940).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
That will be under 0.1 ohm I would hope. I suspect it is the internal resistance of the HC595 gates, which also what limits current for all sorts of cmos chips and why there are designs out there that don't need resistors.
Re learning about the HC595 chip, is the next step to add more displays? If so, consider that if you drive all the row drivers at once, and scan through the colums, the brightness will decrease the more displays you add. With 100 columns, brightness is only 1%. Then you will definitely need driver transistors.
But you can instead drive the rows one at a time, and turn all the columns all at once. Preload all the bits into the HC595, which a propeller can easily do fast enough (especially in pasm), then output them all at once (active low). Then the brightness never goes less than 1/8, or 12.5%.
I finally grasped this concept after a very interesting discussion over in the Sandbox.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
I learn by example better than the traditional book teachings parallax provides. It's just easier for me that way.
I found some example code for driving 74HC595 in the object exchange.
The code was made to drive common cathode dot matrix but I am using common anode.
Can this code be modified to drive my matrix and if so do·I need to add extra components?
I might be wrong but can't the 74HC595 also sink the current?
File attached.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
The code should work fine. You can also cascade 595s - an unlimited number if you like. It just takes longer to clock out all the data.
Re common cathode or anode, for anode, High = led on. For cathode, Low = led on.
HC can source or sink current. Max rating is 25mA per pin.
Are you building this on a breadboard?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
I have made 8x8-Matrix.
Dr_Acula,
Observing the spin code I posted earlier I noticed that there was no connection reference to the Rows.
The matrix I currently have has rows that are common anode so I haven't tried to wire it up.
I have another matrix coming from sparkfun that has common cathode rows and it should be here later this week.
I assume that the common rows would be connected to pins on the propeller but I see no reference to them.
Did the author of the Demo_Simple_74HC595.spin driver intend on me using two 74HC595's one for the columns and one for the rows?
What am I missing here? Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
From looking at the code, it looks like that demo only demonstrates how to set various bits in one of the 74HC595 shift registers. It looks like it's left to your interpretation to figure out how you'd want to configure the latches.
Assuming you wanted one latch for rows and one latch for columns, I think (someone correct me if I'm wrong) that you could do the following:
I *think* the above may be what you're looking for. I have to confess that I've never instantiated the same object twice before in the same program, but I'm sure someone will correct me if I'm wrong.
One other thing regarding maxtrix displays and anodes and cathodes .... If you wan't to make the rows cathodes instead of anodes (or vice-versa), can't you just rotate the display 90 degrees so that the rows are now columns and the columns are now rows?
I'm no electronics engineer but it's my guess I'd goof the reversal somehow.
The whole purpose of this thread was for me to get some sort of idea on how dot matrix displays work and what the code consisted of.
I now realize code would be chip specific and have similar but unique characteristics in order to get the dot matrix to function as intended.
The best thing for me to do is figure out exactly what approach·I would like to use concerning interfacing the prop with a dot matrix and go from there.
Everyone has been very kind and helpful.
Thank you so much.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/20/2010 1:21:55 PM GMT
I'm very interested in this as well. 8x8s are great but I'm not quite sure yet how to scale it up to more modules. So I went off on a tangent and looked at 14 segment displays. The driver is very similar - just use 14 row drivers instead of 8. I've got some 7x5 displays I'm tempted to try as well.
See attached.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Nice! Looks like you have vested much time in that board.
I plan on just building one simple matrix test rig for now.
I really want to concentrate on how matrix's work and learning to write my own driver program.
In the future I hope to accomplish a 24x160 full color matrix with grayscale that would be used for a pinball machine.
For now I will have to rely on·the forum and good old fashioned hard work.
Eventually I'll make this happen with help form the community. I refuse to give up [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/19/2010 6:32:34 AM GMT
came in the mail today! http://focus.ti.com/lit/ds/symlink/tlc5941.pdf
Oh... My... God! These things are tiny!
Found these on Ebay. Look for SMT to DIP adaptors, 0.025" 14-28 pin converter SMD #22
·
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/20/2010 1:18:52 PM GMT