Go Down

Topic: [Solved] 74HC595 problems (Read 1 time) previous topic - next topic

Steen

Jan 24, 2013, 02:04 am Last Edit: Jan 29, 2013, 03:42 pm by Steen Reason: 1
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:
Code: [Select]

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

Boffin1

#1
Jan 24, 2013, 04:12 am Last Edit: Jan 24, 2013, 04:26 am by Boffin1 Reason: 1
How are you driving the LEDs  the 595s ?

CrossRoads

Show your schematic.
Probably needs a 0.1uF cap on the Vcc pin of each part - and nowhere else.
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.

Boffin1

Hi Crossroads,

Quote
and nowhere else.


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

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

CrossRoads

When pigs fly apparently...
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.

Boffin1


Steen

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

Hippynerd


Hi Crossroads,

Quote
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.
https://sites.google.com/site/rgbledcubes

dhenry

Quote
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?

:)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy