0
\$\begingroup\$

I am using this Shift Register.

My circuit is the same as the Figure 14 in the datasheet.

I am trying to understand how the data flows from the MCU Serin, Serout lines and how the LED are driven.

The data transfer speed is 1Mbps.

Suppose, we send a bit stream from the MCU like 0s and 1s, and some LEDs turn ON and some are OFF. After sometime, a different LED is turned ON, the bit pattern from the MCU to the shift regsiters are changed right? At that time, the already Glowing LEDs might turn OFF for an imperceivable time and get back ON? Is my understand correct?

If not, please let me know how the data flows completely from the MCU, to the shift register and the Back to the MCU via Serout line. (Serout is then fed back to an MCU pin)

I have less understanding of Software coding. Please explain in simple terms.

\$\endgroup\$
0

2 Answers 2

0
\$\begingroup\$

This is how it goes.

First, what a shift register like the one you're using does, is receiving data one bit at a time, alas serially, via SERIN and then it assembles it and provides capability to output the received data in parallel via DRAINx pins.

To further illustrate, say you want to send byte 0x14 = b00010100. Serially, you would have to send first 0, then 0, then 1, then 0, then 1, then 0, then 0, then 0 and finally 0. If you send this sequence to the shift register it will be able to later show the 0x14 at the same time via DRAIN pins, which in turn will result in some LEDs being off and some on.

The IC you are using is not just a shift register, it provides logic so you can control whether DRAIN pins are enabled or not. If you only had a raw shift register you would be able to see data being shifted in every clock cycle (each clock cycle a bit is shift in). By pulling high G signal you can wait untill all 8 bits are in and only then pull low and thus enable outputs.

If you want to show one byte and then another, as you say you have to send first byte, enable output, then disable and wait for the second byte to be shifted in and then enable again to show it in LEDs. Usually these steps ocurr fast enough that when LED are off waiting for more data to be output is imperceptible.

if you are only using one shift register, you don't have to worry about SEROUT. This pin is used when you want to daisy-chain several shift register to accomplish control of +7 LEDs. I don't see why you would have to connect SEROUT back to microcontroller.

\$\endgroup\$
1
  • \$\begingroup\$ This answer made the concept more clearer. Thank you for the detailed answer. Really appreciate the help by keeping this answer simple \$\endgroup\$
    – user220456
    Dec 12, 2019 at 3:16
1
\$\begingroup\$

The shift register and output register can be updated separately. There is a bit clock signal (SRCK) for loading serial data bits into the shift register and separate load clock signal (RCK) to transfer the shift register contents to output latches. So no matter how slowly the shift register contents are updated and bit patterns shifted to correct positions, all 8 output bits get updated simultaneously when the output register is loaded. So it is possible to change one output bit without having glitches on other outputs, as the shift register is not directly driving the pins.

\$\endgroup\$
2
  • \$\begingroup\$ Can you explain with a little more detail regarding the process with an example please \$\endgroup\$
    – user220456
    Dec 9, 2019 at 9:24
  • \$\begingroup\$ I'm afraid this is a sketchy comment, not an answer. Downvoting until greatly improved, with a diagram, or deleted. \$\endgroup\$
    – TonyM
    Dec 9, 2019 at 9:27

Your Answer

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