Making shift registers faster (connecting them in parallel)

Post here to discuss all things Arduino!

Moderators: Chuckt, Garth, bitfogav

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
Saimaster13
I practically live here!
I practically live here!
Posts: 176
Joined: Mon Aug 13, 2012 4:23 am
Location: Sarasota, Florida
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Making shift registers faster (connecting them in parallel)

Post by Saimaster13 » Mon Nov 12, 2012 7:26 am

In a large LED screen the Arduino cannot shift the data out fast enough to 595 shift registers connected in serial. So, what if they were connected in parallel? It would take more pins, but it should be a lot faster.

The idea:
This should be 3x slower:
Image

This should be 3x faster:
Image


All the latch pins and clock pins would be connected together, the serial branches would be connected as normal, but each branch would have its individual data pins. That way it could run multiple branches but it would only take the amount of time to run as running one branch.

Would this idea work? Is there any foreseeable problems? I am already working on the code.
Attachments
595 serial.png
595 serial.png (5.96 KiB) Viewed 13151 times
595 parallel.png
595 parallel.png (6.88 KiB) Viewed 13151 times
Joshua

User avatar
Saimaster13
I practically live here!
I practically live here!
Posts: 176
Joined: Mon Aug 13, 2012 4:23 am
Location: Sarasota, Florida
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Making shift registers faster (connecting them in parall

Post by Saimaster13 » Mon Nov 12, 2012 3:09 pm

What I came up with seems like it might help a little, but it isn't very significant. I made a code using the digitalWrite functions, but I've just been reading that addressing stuff directly using the ports may be faster (portA, I don't really know, etc.) Is it faster? I've been doing a little research and will try to write up the code soon.
Joshua

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Making shift registers faster (connecting them in parall

Post by brad » Tue Nov 13, 2012 5:30 am

You are certainly on the right track here. If you connect them in parallel you will get faster data throughput. However, it all depends on how you send the data out to the displays. If you send out one bit to the first column, then one bit to the second then one bit to the third and then send the clock pulse for them to grab the data, you are saving yourself two clock pulses opposed to the original way you were doing it.

But if you want to save even more time, you would access the ports directly, the most efficient method would be to use all eight bits on a port (so eight columns) and you would send a byte out to that port, then a clock pulse to make them all grab the data at the same time (one bit for each of the eight registers)

This way you will be doing it a whole heap faster than the previous two methods!

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 7 guests