[Solved] 74HC595 problems

Hi

I was trying to get my LED matrix working again today, and stumbled upon a problem. I have two 74HC595 cascaded. The first one (to which I send the data) is the colum driver, the 2nd one is the row driver.
Usually when you run this code:

int latchPin = 8; //9->8
int dataPin = 11; //8->11
int clockPin = 12; //10->12

byte col = 0b10000000;
byte row = 0b10000000;

void setup()
{
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

void loop()
{
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, LSBFIRST, row);
  shiftOut(dataPin, clockPin, MSBFIRST, col);
  digitalWrite(latchPin, HIGH);
  delay(1000);
}

The LED is constantly lit, right?
Since when you sent the data and pulled latchPin up, the register remembers its bits and keeps outputting them constantly, right?

Well, I don't see it. It keeps flickering every second.
It never lights up constantly, I really have no clue what I am doing wrong, I have checked the schematics over 10 times, and can't see any mistake.

Note the everything works actually, I can address every row and colum as I should be able to, but somehow the outputs of the shift registers don't have continuous outputs... Is it possible that I broke something?

Nick

How are you driving the LEDs the 595s ?

Show your schematic.
Probably needs a 0.1uF cap on the Vcc pin of each part - and nowhere else.

Hi Crossroads,

and nowhere else.

Can we not get that example with the cap on the latch line corrected ?

When pigs fly apparently...

:slight_smile:

It's solved, There seemed to be a faulty cable, I just reconnected it and it works now :slight_smile:
The cable was one connected to GND, so that might be a reasonable explanation.

Boffin1:
Hi Crossroads,

and nowhere else.

Can we not get that example with the cap on the latch line corrected ?

http://arduino.cc/en/Tutorial/ShiftOut

Pretty please? sigh could we also put some decoupling caps on the TLC5940 Tutorial too? how about a simple explanation of why you need them, what is the proper size, and how you determine the size.

Is that really too much to ask for? I suppose it probably is.

There seemed to be a faulty cable, I just reconnected it and it works now

How dare you? Providing an example where the fault is not decoupling caps?

:slight_smile: