Pages: [1]   Go Down
Author Topic: 3 separate 74HC595 how to control? with less pins  (Read 736 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys,

I have 3 different 75HC959 shift registers connected to Arduino. I tried to share the data and the clock pin for three ics and use separate Latch pins, to cut down on the number of pins needed to be used. But the LED matrix would not work properly.

Do have do to have three separate (data,clock,latch) for each shift register that I need to control?

Thanks


Logged

Northern Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No you don't need 3 arduino pins for each shift register. Connect all the clock pins together and all the latch pins together. The serial out (pin 9) goes to the data pin (pin 14) of the next 595.  That's the beauty of it, you can have as many as you want using only 3 pins.

Carl
Logged

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 0
Posts: 106
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ya, just connect data out of the 1st IC to the data in of the 2nd IC, data out of the 2nd IC to the data in of the 3rd IC....
connect all clock and latch pins to the same output of the Arduino. On the programming, you need to use the shiftOut function 3 times continuously. So, the 1st shiftOut will go to IC 1. But when you shiftOut the 2nd time, the 1st shiftOut binary data will be pushed to the 2nd IC, and so on...
Logged

arduino-freelancer.blogspot.com

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

Connect to the SPI pins, SCK & MOSI, with a chip select that latches all 3 at once.
SCK parallel to all 3, MOSI daisy chained, CS in parallel to all 3

This will write them really fast, compared to shiftout:

digitalWrite(CS, LOW);
SPI.transfer(byte1);
SPI.transfer(byte2):
SPI.transfer(byte3);
digitalWrite (CS, HIGH);
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.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for everyone's comments and help.

CrossRoads can you explain your advice, I am not familiar with the method. does it require an additional IC?

Connect to the SPI pins, SCK & MOSI, with a chip select that latches all 3 at once.
SCK parallel to all 3, MOSI daisy chained, CS in parallel to all 3

This will write them really fast, compared to shiftout:

digitalWrite(CS, LOW);
SPI.transfer(byte1);
SPI.transfer(byte2):
SPI.transfer(byte3);
digitalWrite (CS, HIGH);
Logged

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

A Picture is worth ...


* SPI_ShiftRegister.jpg (63.96 KB, 960x720 - viewed 48 times.)
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.

Pages: [1]   Go Up
Jump to: