Pages: [1]   Go Down
Author Topic: 74HC164N Binary Help  (Read 839 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to use 3 74HC164N's to control 22 leds.

I am new to the Arduino Sandbox, so please bare with me.


How do I daisy chain the 3 shift registers? (I figured I should connect the data in to Q7 on the previous register)
but where does clock go?

also since I have expanded this to 3 shift Registers what does the bit string look like? If its 8-bit for one...is it 16 bit for 2? 24 bit for 3?

ie one register = B00110101
   two register = B00110100011010111?

(probably not...)

Im really LOST...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27114
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

http://www.ti.com/lit/ds/symlink/sn74hc164.pdf

Connect all CLKs in parallel to Arduino.
Connect all CLRs to +5.
Connect Qh of 1 to A & B of the next, Qh to A & B of the next.

Perform 3 shiftout()s to send out 3 bytes of data.
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.

USA
Offline Offline
Sr. Member
****
Karma: 14
Posts: 372
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

(I figured I should connect the data in to Q7 on the previous register)
That's right.
Quote
but where does clock go?
The same clock signal goes to the clock input on each IC.
Quote
what does the bit string look like?
You don't say what method you're using to interface the shift registers.  I'll presume that you're using the shiftOut() function. The output value for that function has the type byte, so it's eight bits long.  If you want to shift three bytes, you'll have to call the function three times.
Logged

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

Ok...there are 10 people in this world. Ones that understand Binary and those that dont....

I get the joke but not shifting binary to a shift register.


I am sending a string:
B00000000;
B10000000;
B11000000;

thinking this would translate to turning each led on sequentially...I was wrong...

I could use just a bit more direction.

Thanks!!

++EDIT++

Realized i was using LSB not MSB....changed the way it worked thanks!
« Last Edit: July 10, 2012, 02:44:40 pm by RazorFly » Logged

Pages: [1]   Go Up
Jump to: