I need to drive 80 RGB leds (so 240 individual leds), physically and conceptually aligned as an 8x8 matrix + an additional vertical line and an additional horizontal line.

I'd like to drive the matrix using 595 shift registers, so that I only need 3 microcontroller lines to drive all the leds, multiplexing the leds. The RGB leds I'm using are common anode. I'd like to have at least 3 levels of brightness for each color (full off, half on, full on).

I found many examples of driving an 8x8 RGB matrix with shift registers, but I'm trying to understand what's the best way (code-wise, mainly) to add the additional 16 RGB leds.

Option 1: a 9x9 matrix. If so, the additional column pin and additional row pin would come directly from the microcontroller and not from and additional shift register, since a shift register for only 2 pins would be wasted.

Option 2: a sub matrix in series with the first, that shares the anodes with the main matrix, but uses only an additional shift register to drive the additional cathodes. Other options?

thank you and sorry for my bad english.


  • \$\begingroup\$ You might want to read about charlieplexing \$\endgroup\$
    – PlasmaHH
    Commented Sep 18, 2018 at 16:37
  • \$\begingroup\$ Afaik with 4 chained 595's you can drive 32 LEDs, so you need more than 3 pins for 64 or 80 LEDs, unless you use the 595's to drive (sub) 595's. \$\endgroup\$ Commented Sep 18, 2018 at 16:37

2 Answers 2


Make the matrix from WS2812B instead, then just serially data chain the data from one to the next for all of them. Sparkfun carries thru hole 5mm parts in 2 different shapes. Then you don't need complex multiplexing either, just send out 240 bytes of data when you need an update using the FastLed.h library.

Or you can get strings of SMD WS2812Bs and lay out 9 strips of 9 LEDs, makes the wiring even simpler - connect the Gnd, Power all along one end, and a single data line from the end of one strip to the start of the next.

  • \$\begingroup\$ The WS2811 allows for more configurations of RGB LEDs, but for single LED RGB pixels it's hard to beat the WS2812B or the Adafruit Neo-Pixels \$\endgroup\$ Commented Sep 18, 2018 at 17:49
  • \$\begingroup\$ Yes, seperate driver chip vs combined driver + LEDs. WS2803 is another option for seperate driver for 18 LEDs (or 6 RGB LEDs), daisy chain a bunch of those. \$\endgroup\$
    – CrossRoads
    Commented Sep 18, 2018 at 17:51
  • \$\begingroup\$ @JackCreasey Hard to beat? Have you seen the TI TLC5973. 50 mA, up to 21V outputs, one wire clock and data, 12 Mhz internal oscillator, 12 bit greyscale, 3 Mbs, 2.9 Khz repeat rate, and unlimited pixels. The LEDs in the WS2812B are a bit dismal, and I prefer to select the RGB for the application. I like the Luxeon C Color for color bright mixing apps, I also prefer 660 nm red and 450 nm blue much deeper colors. For billboard video the Cree CLMVB-FKA RGB in a 2 x 2 mm case is very compact. There is also a TLC59731 8 bit. And best of all good documentation. \$\endgroup\$ Commented Sep 19, 2018 at 21:09
  • \$\begingroup\$ @Misunderstood Nice one, I must try some of those TI chips. \$\endgroup\$ Commented Sep 19, 2018 at 23:17

Even though a dead thread, this looks like a Launchpad type deal. Driving 240 LEDs is pretty easy when using individually addressable LEDs like they are being used in programmable LED strips. You send one long signal to the first LED which grabs the info it needs for itself and sends the rest of the data to the next LED down the line. No real need for shift registers as far as I understand this tech.

  • 1
    \$\begingroup\$ I didn't downvote but while your answer is on the right track it lacks detail as to how it would be different from the currently accepted answer of using the WS2812B which is actually "an individually addressable LED commonly used in programmable LED strips". Also recommend putting your discord info in your profile as the end of your answer is kind of like a forum signature which is discouraged here. Thanks for your first contribution! \$\endgroup\$
    – nvuono
    Commented Jan 24, 2020 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.