Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Arduino 16Bit Shift Register

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,347
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 4, 2010

This is now straying from what's immediately possible with the ARDX starter kit. The 8bit register example mentions that you can chain them together for however many bits as you want.

So I went out and bought another 8bit shift register, and a 10LED bargraph. So after reading wikipedia I tried putting together a 16bit shift register by chaining the two 8 bits together.

It's actually pretty simple to wire up. The input data for the second simply comes from the last digit out of the first. all the other controllers and grounds etc. are exactly the same.

Why is this useful? Well. This still only uses 3 arduino pins to control the data. In principle I can add another 8bits with another chip and have a 24bit register, and so on ad infinitum..

The tricky bit is breaking down the bits into 8bit chunks. then sending them in the right order during the set signal. This basically means sending the highest 8 bits, then he lower 8bits. I tried sending a word directly and it didn't seem to work, so it took:

shiftOut(data, clock, MSBFIRST, (int)highByte(state));
shiftOut(data, clock, MSBFIRST, (int)lowByte(state));

Overall this little configuration is a pretty handle little setup. The ability to set up a bargraph on just 3 pins is pretty useful, so I am thinking of soldering up a circuit like this as my first custom arduino shield, as this would be pretty handy for prototype meter circuits. The only bit which is a shame is that the bargraph is 10 leds, and I have 16 bits, so it feels like I'm wasting the extra 6 bits I have. I might look at getting a 16bar if possible, or maybe add 10 green, 6 red to indicate high or something.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (1)

Sign In or Sign Up now to post a comment!
  • cool man... i had the 8bit working flawlessly in a POV display... tried to extend it to 16 bits but couldn't get it to work exactly right... I think the problem is similar to what you first encoutered --> have to split into a highByte/lowByte cuz the shiftOut function is made for 8bits...

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more