Pages: [1]   Go Down
Author Topic: simple explanation of shift register use.  (Read 4164 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 had to try and explain what a serial in parallel out shift register does, and came up with this, which might be of some use to newcomers.

A postman ( mailman ) has to deliver 10 parcels to 10 houses in a row, he can only carry one at a time, so to save a lot of walking,  he comes up with the idea of parking at the end house and tooting his horn ( taking the latch pin low ) to call the people out of their houses to their front gardens.

 He then gives the parcel for the furthest house to the lady at the first house, and asks her  ( taking the shift register clock high and low again ) to pass it to the next lady.

He then gives her the second parcel and shouts to everyone to pass them on ( pulsing  the shift clock again )

When all the parcels have been passed out , he tells them to take them indoors and open them ( by taking the latch pin high again )

In practice this save a lot of wiring ( walking )  and a great many devices can be connected to shift data to the right device, such as LED displays which would need thousands of individual wires to light the correct patterns.
Logged

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49080
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would be a really nice analogy if there were 10 input bits/10 output lines. But, there probably aren't.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not bad. And an example of using arduino output pins directly would be sending 10 postmen out each with one package to deliver at nearly the same time, much faster but uses up resources (mailpersons/trucks = pins used).

Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 534
Posts: 26964
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay PaulS, how about 16 bits then?

http://www.maxim-ic.com/datasheet/index.mvp/id/4809/t/al
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.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

You could with a bit of imagination having the people swapping parcels with ones to be posted, going the other way in a SPI fashion?
Logged

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

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 534
Posts: 26964
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, that'd be a shift-in register. Parallel load, serial shift in.
74AC299 is nice chip, can do both, and shift left or right.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.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 was thinking of the MISO  MOSI  action of swapping parcels.
Logged

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

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 534
Posts: 26964
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, that's the built-in hardware version of shiftout () or shiftin(). 
Same concept of passing out one at a time, or collected  many at a time but turned in 1 by 1.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.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

Yes,  its probably getting away from my original " Harry Potter does Arduino" explanation for absolute beginners :-)
Logged

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

Pages: [1]   Go Up
Jump to: