Hello and sorry for novice question. I'm trying to use the 74HC595 shift register to ground my LEDs, as opposed to powering them, shown in the tutorial. This question has been asked on these forums, and has even received an answer, but unfortunately I just can't wrap my head around it.
As far as I understand electricity, mentioned common anode (to which I am asked to wire +5v) happens in the tutorial case of powering the LEDs: current flows into the registry through the common anode and is then dispensed among individual cathodes to power LEDs and eventually get grounded, while I am looking to get a common cathode, with multiple anodes. On the other hand wiring 'resistors from each cathode [I assume thats the LED cathode] to the shift register' would imply that the register has multiple additional anodes, since you always wire cathode to anode. So it would mean the register only has anodes, on both sides, and no cathodes at all? I'm very confused. Maybe some 'translation' from the language of cathodes and anodes to the language of pin numbers (datasheet) could clear it up for me. Thanks in advance
What LEDs do you have. You have to have multiple LEDs to have a common anything.
Yes connect the common anode to the +ve and each cathode through its own resistor to the shift register's outputs.
This is known as current sinking.
Sorry, I don't understand your question...
You need a resistor in series with each LED. When components are wired in series, the same current flows through both components, but the voltage is divided among the series components. i.e. You might have 20mA through the led and resistor, and with 5V applied, you might have about 3V across the resistor and 2V across the LED.
It doesn't matter if the resistor is connected to the anode or cathode (assuming you've got a normal 2-pin, one-color, LED). With the LED and resistor connected in series, you can treat these as one component.
The shift register doesn't have anodes or cathodes... It has a logic output. This particular part has "tri-state" outputs. That means they can driven high (+5V) to "source" current, driven low (ground) to "sink" current, or essentially off or unconnected ("tri-stated").
That tutorial has an error. The capacitor connection is wrong, it should be wired between the ground and the positave supply of the chip.
Wiring like it is shown will damage your arduino.
You have to say what sort of LEDs you have. Are they seven segment or individual two pin LEDs?
DVDdoug:
The shift register doesn't have anodes or cathodes... It has a logic output. This particular part has "tri-state" outputs. That means they can driven high (+5V) to "source" current, driven low (ground) to "sink" current, or essentially off or unconnected ("tri-stated").
Ok, that's where I was wrong. I was considering the register as a set of transistors, where I can either close the circuit (1) or open it (0), while in fact it's always a closed circuit and I can choose if I want the output pin to be set to ground voltage (0), or power supply voltage (1), or even set to the high impendance mode. Correct me if I'm wrong, but this approach has at least led me to getting my setup to work. Thanks a lot!
EDIT: @Grumpy_Mike:
I've wired the capacitor as shown and my arduino still seems to be intact, but if that really is the case how to notify someone to modify the tutorial?
We've tried getting the Arduino-team to change many faulty guides over the years, but they are not interested in getting things fixed.
I guess it's just the italian mentality ![]()
// Per.
Perhaps more arduinos get sold, that way.
Zapro:
I guess it's just the Italian mentality
Eh, you betta watch what you say or we send the boys round ... XD
It is not actually an Italian that is responsible for that tutorial.
Grumpy_Mike:
It is not actually an Italian that is responsible for that tutorial.
I know, but. It's an italian that cease to respond to queries when we ask if we can fix the faulty guides...
It's just sad that newbies go to trust the guides from a seemingly credible source, but are let down by simple errors. This is the last thing you need as a newbie, to get taught the wrong way.
// Per.