8x8 matrix driven by 2x 74HC595 - weird flickering problem

Hello,
I have tried to setup simple learning project, using 8x8 LED matrix and two 74HC595 shift registers.
I have followed register's wiring in this tutorial: http://arduino.cc/en/tutorial/ShiftOut
But when I have tested it, I couldn't get clear image on display, all leds were flickering during re-drawing procedure, making image nearly unusable. Then I have discovered that if I break +5V connection from adriono to registers, flickering stops and display is working exacly as expected.
I know that I have not used capacitator on latch (because I didn't have one), but I am now really confused that only disconnecting power from my setup solves everything, if there is anyone so kind to explain me what really happened and how to avoid thore mistakes/problems in the future, it would be awesome :wink:

Board: Arduino UNO R3 + prototyping shield (please ignore LCD and not-connected wires, I am using this set-up for loads of self-learning projects)
Video: Arduino LED-matrix using 74HC595 shift-registers - weird behavior - YouTube
Source: GitHub - AfBu/arduino-led-matrix-test: Test program to control 8x8 led matrix using two 74HC595 shift registers.
Images: 3 items

I know that I have not used capacitator on latch

Nor should you - that will only damage the arduino pin driving it.
You do need a 0.1uF cap on each shift registers power pin to Gnd.

If it is flickering, that can be fixed in coding by turning off the drives while the data is being changed.

The data sheet for the shift register shows that you need to ground all unused output pins. That seemed to work.

gabriella:
The data sheet for the shift register shows that you need to ground all unused output pins. That seemed to work.

No! That will damage the shift register by causing short-circuits.

AfBU:
Hello,
I have tried to setup simple learning project, using 8x8 LED matrix and two 74HC595 shift registers.

Unfortunately you seem to be learning lots of bad habits.

As Crossroads said, you should have a 0.1uF bypass cap on each chip. You should also be using series resistors (x 8 ), otherwise you will damage the shift registers or the leds. You should also respect the current limits of the individual outputs and the chip as a whole.

74hc595 is not a great chip for driving leds, it was not designed for that and is current limits are to low to drive a matrix properly without damage. Max7219 is a much better chip for this.

@gabriella, check the dates on topics you respond to - this one is >2 years old.