Let's imagine a strip of 30 LED, each of those controlled by daisy chained shift registers and a micro controller.

I would need 4x 8-Bit shift registers like the SN74HC595, and the last 2 outputs wouldn't be used.

If this strip of LEDs (and associated shift registers) was part of a module assembly where you could chain modules one after another, and the output of the first module would get shifted to the input of the following module, etc... This would work fine with multiple of 8 LEDs, as the SN74HC595 includes an output for daisy chaining.

But the strip is 30 LED only so the 6th output of the last shift register should be shifted to the next LED strip, thus by-passing the last 2 bits.

Is there an easy way to do so ?

EDIT: Looking for a hardware way of doing it, as 30 LED is an example but let's assume the length of the LED strip can be any number, and I want my code to work with any combination of LED/number of modules.

  • 2
    \$\begingroup\$ I don't see the problem: just include the 'dummy' LEDs in the data that you shift out. \$\endgroup\$ Jul 17, 2018 at 18:23
  • \$\begingroup\$ I'm looking for a hardware way of doing it. Of course tweaking the code can achieve this but if there is an easy connection that would save some loops in the code I'd rather do it. If not then I'll code it. \$\endgroup\$
    – Fredovsky
    Jul 17, 2018 at 18:27
  • \$\begingroup\$ If you don't object to some flickering you can tie the clocks of the 595 together and use the Qe output (for 6 LEDs). Or you can suppress the flickering by switching all LEDs off while clocking in the new bits. But personally I'd prefer a software solution! \$\endgroup\$ Jul 17, 2018 at 18:40

1 Answer 1


There is not an easy way to chain the modules at non-byte boundaries with that kind of shift register.

If you can tolerate using a different shift register, such as the 74HC164, shown below, then you can use any parallel output as the input to the next stage, thus skipping the bits beyond the selected output. Note that if you are shifting at say 1 MHz, you can clock thousands of serial bits before the flicker becomes noticeable.

enter image description here

If you have an application where you want to serially load a pattern and then present it all at once by clocking the output register, then you could just add two unused bits at the start of the string that you are serially loading for each daisy chained module. These would get shifted into the unused bits at the end of the module.

  • \$\begingroup\$ It's what I instinctively thought, but in that case, how come QH and QH' are not the same line ? \$\endgroup\$
    – Fredovsky
    Jul 17, 2018 at 18:17
  • \$\begingroup\$ @Fredovsky Good question. I may have spoken too soon. I am in the process of revising the answer ... \$\endgroup\$
    – crj11
    Jul 17, 2018 at 18:20
  • 1
    \$\begingroup\$ What you suggest won't work, because Qf is an output of the holding register, not of the shift register. That's why there is a Qh' \$\endgroup\$ Jul 17, 2018 at 18:22
  • \$\begingroup\$ @Fredovsky Revised answer above \$\endgroup\$
    – crj11
    Jul 17, 2018 at 18:38
  • \$\begingroup\$ Thanks unfortunately I think I can't let go the Output Enable of the SN74HC595. I guess it'll be software solved. \$\endgroup\$
    – Fredovsky
    Jul 20, 2018 at 8:14

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.