Go Down

Topic: Understanding Shift Registers (Read 2 times) previous topic - next topic

Ryan J Blajda

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.
www.facebook.com/ryan.j.blajda

Jack Christensen

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.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

tempmj

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
http://www.controllerprojects.com
My hobby controller projects site.

Ryan J Blajda

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
www.facebook.com/ryan.j.blajda

carbine000

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.

Ryan J Blajda


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)
www.facebook.com/ryan.j.blajda

Phredd

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.

Jack Christensen


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
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Jack Christensen


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


You look too young to be watching Knight Rider  ;)

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

I am soooo doing the pumpkin for Halloween!
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

justjed

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

Ryan J Blajda

Quote

You look too young to be watching Knight Rider  ;)


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:
www.facebook.com/ryan.j.blajda

Ryan J Blajda

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.
www.facebook.com/ryan.j.blajda

Go Up