Pages: [1]   Go Down
Author Topic: Understanding Shift Registers  (Read 2652 times)
0 Members and 1 Guest are viewing this topic.
Winter Park, Fl
Offline Offline
Full Member
***
Karma: 0
Posts: 103
I dabble with arduino, web design and other tech things, but I enjoy A/V and music as my career as an A/V Fabricator and owner of a home studio.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to make a Knight Rider Larson Scanner eventually in my Arduino career, but i dont understand how to write the code to turn on individual LEDs in said shift register...if someone could explain this/ give me a simple example that would be awesome. I get that you do this somehow with individual bits but i dont get how to do it. Anyways,

Thanks,

Ryan.
Logged


Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4094
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

While this can be done with a shift register, it's not strictly needed.  Arduino has 14 digital I/O pins that can drive LEDs.  So unless you want more than 14 LEDs, then no additional hardware is necessarily needed.  OTOH, shift registers are fun and instructive to play with and I'd encourage you to do so!

Here is an online shift register simulator that may help: http://conductiveresistance.com/interactive-595-shift-register-simulator/

Datasheets can be intimidating at first, but I'd also encourage you to spend some time with the datasheet for your particular shift register.  Just look it over and see what parts help.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Another example, using Arduino to control 8 LEDs via a 74HC595 shift register:

http://www.controllerprojects.com/2011/01/18/interfacing-arduino-with-74hc595-to-control-8-leds/

and the schematic for the example:

http://www.controllerprojects.com/wp-content/uploads/2011/01/74HC595_A1.pdf
Logged

http://www.controllerprojects.com
My hobby controller projects site.

Winter Park, Fl
Offline Offline
Full Member
***
Karma: 0
Posts: 103
I dabble with arduino, web design and other tech things, but I enjoy A/V and music as my career as an A/V Fabricator and owner of a home studio.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you guys so much. I just ordered my Arduino this Monday and it should be here in all its glory this Wednesday! I have been trundling the forums gaining knowledge, so i will not be looking stupidly at it once it arrives in the mail going "now what do i do?"

Anyways, Thanks

Ryan
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But what about the code?

How do you output the information to the shift register?

Do you run a "For" Loop where the output is 0, 1,1, 0, 0, 0, 0, etc.
Logged

Winter Park, Fl
Offline Offline
Full Member
***
Karma: 0
Posts: 103
I dabble with arduino, web design and other tech things, but I enjoy A/V and music as my career as an A/V Fabricator and owner of a home studio.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

But what about the code?

How do you output the information to the shift register?

Do you run a "For" Loop where the output is 0, 1,1, 0, 0, 0, 0, etc.

Well not exactly, try out this link it helped me understand what the heck i was doing.

http://conductiveresistance.com/interactive-595-shift-register-simulator/

and thanks to Jack Christensen for the link (http://arduino.cc/forum/index.php?action=profile;u=35906)
Logged


Ontario, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Old guy, new to electronics
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Google "Sparkfun Inventor's Guide", look at Circuit 5 (CIRC-5) and compare with Circuit 2.  It makes it quite clear and you can also download the commented code.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4094
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Google "Sparkfun Inventor's Guide", look at Circuit 5 (CIRC-5) and compare with Circuit 2.  It makes it quite clear and you can also download the commented code.

Good suggestion!  Here's a link: http://www.sparkfun.com/tutorial/AIK/ARDX-EG-SPAR-WEB-REV10.pdf
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4094
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to make a Knight Rider Larson Scanner eventually in my Arduino career...

You look too young to be watching Knight Rider  smiley-wink

Maybe you're already aware of these: http://evilmadscience.com/productsmenu/tinykitlist/152-scanner

I am soooo doing the pumpkin for Halloween!
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

CO, USA
Offline Offline
God Member
*****
Karma: 5
Posts: 711
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See also the Complete Beginners Guide to Arduino from Earthshine Electronics, page 41.
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Winter Park, Fl
Offline Offline
Full Member
***
Karma: 0
Posts: 103
I dabble with arduino, web design and other tech things, but I enjoy A/V and music as my career as an A/V Fabricator and owner of a home studio.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You look too young to be watching Knight Rider  smiley-wink

Haha my dad gave me the first season for my birthday a while ago, and i watch all of the older shows, Battestar Galatica (the 1987 or whichever year that was), Knight Rider, Superman etc. all the old shows were so good!!  smiley-surprise
Logged


Winter Park, Fl
Offline Offline
Full Member
***
Karma: 0
Posts: 103
I dabble with arduino, web design and other tech things, but I enjoy A/V and music as my career as an A/V Fabricator and owner of a home studio.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just posted a new topic, with an update on my ignorance of shift registers, so for anyone who would like to enlighten me, it would really be appreciated.
Logged


Pages: [1]   Go Up
Jump to: