Pages: [1]   Go Down
Author Topic: some even more about daisychaining shift registers  (Read 552 times)
0 Members and 1 Guest are viewing this topic.
Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have searched quite a lot on shift registers for a recent project, and a few things kept coming up that I can throw my ten cents worth in. ( O&OE  T&Cs apply and everything IMHO  smiley-wink  )

There have been several queries about what a daisy chainis , see
http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Daisy_chain.JPG/800px-Daisy_chain.JPG for a photo of the original.

Many years ago before playstations etc, kids used to thread the stalk of one wild flower through a slot in the next and so on,
This is like us sending our data through one shift register ( say a 595 ) which pushes the stream of data out the other end 8 bits later to the next chip.

In the otherwise excellent tutorial on Shiftout, one of the comments in the code says

 // turn off the output so the pins don't light up
  // while you're shifting bits:
  digitalWrite(latchPin, LOW);

IMHO the output pins will not change until the latchpin goes high...
You can fill all the registers and then flip the latchpin low then high and then the LEDs will change.

The 1mFD cap on the latchpin I think must have been leftover from an experiment to delay the latch if it is driven high at the same time as the shiftreg clock ( I know I experimented with the same idea when I had the wrong timing )
The cap should not of course be there.

If you are trying to run long daisychains ( I have run 19 but not with the Arduino and also very slowly ) and want to push the speed limit,  why not loop the last shiftregisters' output back to the micro, and compare the last byte sent previously with what comes back this time, if no bits are lost it should be the same...

There are a lot of posts about software dimming, I suppose they want different characters to dim, but for general dimming I have just used the /G blanking pin run from a pwm pin on the Arduino.

Sorry if I have repeated stuff
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Boffin,

Not sure if you're asking anything or making a statement but let's up the ante to 20c.

Quote
// turn off the output so the pins don't light up
 // while you're shifting bits:
 digitalWrite(latchPin, LOW);

IMHO the output pins will not change until the latchpin goes high...
You can fill all the registers and then flip the latchpin low then high and then the LEDs will change.
True, the above comments don't make sense unless they are doing something wierd somewhere.

Quote
to delay the latch if it is driven high at the same time as the shiftreg clock
Yep the cap should not be there, it makes absolutely no sense to tie the latch and clock pins together unless you are desperately short of pins and don't mind having the data ripple through the SR outputs.

Quote
why not loop the last shiftregisters' output back to the micro, and compare the last byte sent previously with what comes back this time, if no bits are lost it should be the same...
If you have reason to believe there could be a fault in the chain that's a good idea. Not much point on a single PCB but if your SRs are on several modules connected by cables that's a good diagnostic tool.


______
Rob

« Last Edit: October 30, 2010, 08:09:43 am by graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mine are all over the place

http://www.scorebauds.co.za/USERIMAGES/pamphlet.jpg

Its easier to have the register in each display and daisy chain the data.

So there's quite a run on a big board.
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice, are they your boards?

______
Rob

Logged

Rob Gray aka the GRAYnomad www.robgray.com

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been making these boards using HT12 encoder/decoder very slow technology,\Now I can even offer team names thanks to Arduino
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Pages: [1]   Go Up
Jump to: