I'm looking into 74HC595's on eBay. I have a question though: What power is actually sent out through the output pins? Is it the same as the power you put into the VCC pin? I only ask because these Shift Registers can run on fairly low voltage, so I was thinking I could possibly get away with inputting only about 3.5 volts, and then using LEDs that require that amount. Having no 595's at the moment, I can't test it myself.
If anyone has the answer (I can't seem to find it in the datasheet), that'd be great.
One more question: When it comes to these Shift Registers, I know they're supposed to source current rather than sink it, but when you set a particular output to low (0), does it connect to ground? Or simply not connect to anything?
I only ask because I was thinking that it would be easy (if you can sink the current to ground through these) to make a 4*4 LED matrix.
[edit]Or is that why people always use Transistors with these things? :P[/edit]
You can sink OR source with them. I believe most of them generally only allow like 20ma per pin... so you'll need a transistor if you're using a LED matrix.
They can source/sink the same amount normally, but you can look into using the ULN28xx (darlington array transistors, basically 8 transistors in a chip) they can handle 500ma per channel, and they're often used to sink current rather than source.
But yeah, you're correct, when a pin is driven low, it's connected to GROUND internally. So if you want to sink with the 595, connect the negative of the LED to the pins, then on the positive of the LED, put the resistor to 5v. (or whatever your supply is) This way, the LED will light up when you drive the pins LOW, and it will turn off when the pin is HIGH.
Do shift registers work by pulsing power between all the outputs that are enabled very quickly (causing a persistence of vision effect when using LEDs)? I think I read that they did somewhere..but I can't remember where to be honest.
If it did do that, I'm still confused, because how could it have an overall maximum current rating that includes all pins if only one is active at a time?
lets say you have 8 led's and you send the shift register B10000000 only 1 led is lit
if you don't write to the register again that 1 led will remain lit, so you have to refresh the "screen" fast enough to display a dot matrix image to the eye that doesn't flicker
keeping that in mind what happens when you send B11111111 to the register?
http://earthshinedesign.co.uk/ASKManual/ASKManual.pdf
You should save that, and read through it later.. but for now, scroll down to the Project where he uses 595's, he has some code that makes them a bit easier to use. And explains alot about how they work.
http://earthshinedesign.co.uk/ASKManual/ASKManual.pdf
You should save that, and read through it later.. but for now, scroll down to the Project where he uses 595's, he has some code that makes them a bit easier to use. And explains alot about how they work.
I have read (most of) the ASK manual, including the part about the shift registers. I'll reread it, but what you guys are saying is that sending B11111111 will turn on ALL of the LEDs simultaneously, correct? And if I wanted to do a POV kind of thing, with only one on at a time, I would need to do that manually with consecutive things like this:
I have another question about Shift Registers and LED Matrices.
We were discussing using 595s to power LED matrices, and someone mentioned that to turn off the LED, you just change the cathode to HIGH (1). My question is: Is it safe to have both the cathode and anode of an LED high at the same time? I assume nothing bad will happen...but you never know..
Also, to power these, people typically do a pov-style of powering, right? applying 5 volts through a resistor to the anode, and then grounding the cathode, and continuing in quick succession to create the illusion of static lights, right?
Is it safe to have both the cathode and anode of an LED high at the same time? I assume nothing bad will happen...but you never know.
Grounding both ends of a LED (LOW) would result in no current flow. Having +5vdc applied to both ends (HIGH) would also result in no current. No harm in either case.
Having ground on the anode and +5vdc on the cathode would result in no current flow because it is a reversed bias condition, Again no harm as long as the applied reverse voltage does not exceed the maximum reverse voltage specification of the diode (see specific LED datasheet).
Having a ground on the cathode and +5vdc on the anode would result in forward current flow and if not limited externally from the LED (either with a resistor, constant current source, etc) could of course damage the LED or the device driving the LED due to excessive current flow above the LED's maximum foward current specification.
Grounding both ends of a LED (LOW) would result in no current flow. Having +5vdc applied to both ends (HIGH) would also result in no current. No harm in either case.
Having ground on the anode and +5vdc on the cathode would result in no current flow because it is a reversed bias condition, Again no harm as long as the applied reverse voltage does not exceed the maximum reverse voltage specification of the diode (see specific LED datasheet).
Having a ground on the cathode and +5vdc on the anode would result in forward current flow and if not limited externally from the LED (either with a resistor, constant current source, etc) could of course damage the LED or the device driving the LED due to excessive current flow above the LED's maximum foward current specification.
if you don't write to the register again that 1 led will remain lit, so you have to refresh the "screen" fast enough to display a dot matrix image to the eye that doesn't flicker
Sorry but that is wrong. These shift registers have output latches, that means you can shift new data out as slow as you like and you will get no flickering. You only get a change in the output when you update the latch with the shift / load line.
latch or not, refreshing at a high enough rate so as your displaying individual dots in a pattern and it doesn't flicker while it presents the entire image to the eye