Cape Town South Africa
Offline
Edison Member
Karma: 17
Posts: 1104
A newbie with loads of posts, and still so much to learn !
|
 |
« on: April 25, 2011, 11:03:01 am » |
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
|
We live in the era of the smart phones and stupid people.
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 316
Posts: 35581
Seattle, WA USA
|
 |
« Reply #1 on: April 25, 2011, 11:06:49 am » |
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
Brattain Member
Karma: 279
Posts: 15320
Measurement changes behavior
|
 |
« Reply #2 on: April 25, 2011, 11:10:30 am » |
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
Offline
Brattain Member
Karma: 249
Posts: 16572
Available for Design & Build services
|
 |
« Reply #3 on: April 25, 2011, 11:58:44 am » |
|
|
|
|
|
Logged
|
|
|
|
|
Cape Town South Africa
Offline
Edison Member
Karma: 17
Posts: 1104
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #4 on: April 25, 2011, 12:09:21 pm » |
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
|
We live in the era of the smart phones and stupid people.
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16572
Available for Design & Build services
|
 |
« Reply #5 on: April 25, 2011, 12:41:02 pm » |
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
|
|
|
|
|
Cape Town South Africa
Offline
Edison Member
Karma: 17
Posts: 1104
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #6 on: April 25, 2011, 01:36:02 pm » |
I was thinking of the MISO MOSI action of swapping parcels.
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16572
Available for Design & Build services
|
 |
« Reply #7 on: April 25, 2011, 01:42:11 pm » |
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
|
|
|
|
|
Cape Town South Africa
Offline
Edison Member
Karma: 17
Posts: 1104
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #8 on: April 25, 2011, 01:48:39 pm » |
Yes, its probably getting away from my original " Harry Potter does Arduino" explanation for absolute beginners :-)
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
|