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?
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.
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...
CrossRoads can you explain your advice, I am not familiar with the method. does it require an additional IC?
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: