0
\$\begingroup\$

If we have for example 3x16bit shift registers connected in series, can we clock 48 bits of data through one shift register at once and then latch all of them to output data registers, LATCH CLK and OE pins are shared.

If my thinking is not right, please explain how data clock works when shift registers are in series.

\$\endgroup\$
2
\$\begingroup\$

You are correct. So long as the Dout of the first shift-register is routed into the Din of the 2nd, and then from 2nd into 3rd, and as you say have Latch, Clock & OE of all 3 connected together & into your MCU (or whatever you're driving them with), then you can clock in 48 bits, and then latch & OE them all at once. What ever was in the 3 registers originally 'disappears' (virtually 'falls out the end' of the 3rd shift-register's Dout pin) SO LONG as you clock in all 48 bits.

Alternatively, you can choose not to clock all 48 bits, for example in a LED display - with this technique you can achieve 'sliding' effects without having to re-clock all the 48 bits (followed by Latch & OE) over & over. You can clock just a single new bit in (which pushes the 48th bit out the far end never to be seen again), and then whatever was originally in the 48 bits shifts over 1 bit - whatever 'pattern' that might be shifts over 1 bit, & a new bit is added. I'm probably not explaining it very well, but just give it a try, you can't hurt anything :)

\$\endgroup\$
  • \$\begingroup\$ Although I don't clock all the 48bits into input shift registers, when I LATCH, 48 bits will be copied to output data register no matter what is in input shift registers? \$\endgroup\$ – user76920 Jun 2 '15 at 12:39
  • \$\begingroup\$ When we latch data from input shift register, whether the data disappears from input shift register or? \$\endgroup\$ – user76920 Jun 2 '15 at 12:48
  • \$\begingroup\$ depends on which shift-register chip you're using! what's the part number? \$\endgroup\$ – Techydude Jun 2 '15 at 13:13
  • 2
    \$\begingroup\$ Your 1st comment is correct - regardless of how many bits you clock in (1, 1, or up to 48), the next time you toggle the Latch line, ALL 48 bits will (again) be copied from the Shift Register into the Output Latch (and if OE is enabled (low) then the new data will be immediately displayed. BTW, there is no need to disable the output (OE high) during any of this clocking & latching, unless you specifically want a visual off/on effect that's separate to the data you're clocking into it. \$\endgroup\$ – Techydude Jun 2 '15 at 13:45
  • 2
    \$\begingroup\$ or in other words, the data you clock into the shift-register remains in the shift register, even after doing a Latch. \$\endgroup\$ – Techydude Jun 2 '15 at 13:48
1
\$\begingroup\$

Yes.

Doing so will simply shift the output from the first register to the input from the next register. This is broadly used on projects where there is a lack of output pins, so that the shift registers can be used as extra output pins.

Also, some shift registers can be used as I/O or input pins, you would then connect the last shift registers' output to your MCU and clock them through.

There also are I/O expanders (/extenders?), I'm not quite sure in which way they differ from shift registers. Some also have an "interrupt" pin, which will signal when one of the registers' input changes, making them more efficient in usage (not having to clock them through to check if something has changed)

Shift registers usage (and chaining) is usually easily explained in tutorials on led cubes (the bigger ones).

Daisy chain shift registers I/O expanders

\$\endgroup\$
  • \$\begingroup\$ I'm also working on some RGB matrices which consists of LED hub which connect 3 16bit shift registers for every color in series. \$\endgroup\$ – user76920 Jun 2 '15 at 12:42
  • \$\begingroup\$ There even are PWM controllers, which have 8 (or even 16 I believe) outputs (similiar to shift registers but) that are able to give a PWM signal. Using those on your RGB matrices will give the possibility to make/blend RGB colors! \$\endgroup\$ – Paul Jun 2 '15 at 12:54
  • \$\begingroup\$ Its really hard to PWM colors bcs of shared OE \$\endgroup\$ – user76920 Jun 2 '15 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy