Go Down

Topic: 3 separate 74HC595 how to control? with less pins (Read 920 times) previous topic - next topic

kclv1988

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



carlmal

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

low5545

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...
arduino-freelancer.blogspot.com

CrossRoads

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);
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

kclv1988

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);


CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up