In my limited experience I have only used RGB LEDs that have a common anode connected to ground and then are lit up by pulling up on the pin connected to the LED colour pins. I currently have 3 Adafruit RGB LED Rugged Metal Push Buttons I intend to use in a project. The LEDs in these buttons are controlled by connecting a common cathode to a 5v supply and then lit up by pulling down on the output pins connected to the LED colour pins. The plan was to use a pair of shift registers to control the LEDs to minimise the number of output pins used. Therefore my question is, can I still use the shift registers to control the RGB LEDs even though the LEDs need to be pulled down instead of up?
\$\begingroup\$
\$\endgroup\$
1
-
\$\begingroup\$ Maybe, because, we don't know how much current your LED needs and if the shift register can supply that. Perhaps mention which shift register you plan to use? Or what kind of driving circuit between shift register and LEDs? \$\endgroup\$– JustmeCommented May 4 at 8:41
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
1
The 'C' pin is for common and it refers to the common-anode, not cathode.
Yes, you can use a 5V shift-register provided you stay within the current limitations by using a high enough value series resistor for each LED.
Just make the SR output '0' for 'on' and '1' for off.
simulate this circuit – Schematic created using CircuitLab
-
1\$\begingroup\$ Thanks! Yeah I totally got the anode/cathode mixed up in my head as the anode on the button is actually labelled as C+. \$\endgroup\$– EwneoNCommented May 4 at 13:11