Pages: [1]   Go Down
Author Topic: [Solved] 74HC595 problems  (Read 918 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Full Member
***
Karma: 0
Posts: 187
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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
« Last Edit: January 29, 2013, 09:42:20 am by Steen » Logged


Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you driving the LEDs  the 595s ?
« Last Edit: January 23, 2013, 10:26:07 pm by Boffin1 » Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When pigs fly apparently...
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Belgium
Offline Offline
Full Member
***
Karma: 0
Posts: 187
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

smiley
Logged

Pages: [1]   Go Up
Jump to: