Go Down

Topic: The 4794 LED Driver example (Read 2 times) previous topic - next topic

Grumpy_Mike

#10
Mar 30, 2009, 01:52 pm Last Edit: Mar 30, 2009, 01:54 pm by Grumpy_Mike Reason: 1
Quote
The resisters are not 100% necessary.


Yes they are, unless you want to burn things out that is.

Quote
I have had trouble with the EO pin. The circuit seems to work better without it.


If without it you mean completely disconnected then you are not driving it correctly in the software.

Ray Andrews

Quote
The resisters are not 100% necessary.

Quote
Yes they are, unless you want to burn things out that is.


Some people like the smell of magic blue smoke ;)


Alex D

Hello,

Is it possible to use the above example with an MM5450BN chip?

http://www.datasheetcatalog.org/datasheet2/9/0o13pk69a9pykerrd82w018d42py.pdf

I wired it all together based on fatfinger's diagrams and ran the code listed on arduino website, not working!

Im trying it with just 1 LED right now and from what I read about 5450, it does not need a resistor for the LEDs (I tried it both ways though).

To check the LED itself I ran it with "Blink" example through pin13 and it works - so the voltage/ground part is right at least.

With the slight datasheet differences between the chips, can someone verify the following.. ?

4794    5450
STR  =  Brightness control ?
CP    =  Clock In ?
EO   =   Data Enable ?
Code: [Select]
int data = 9;
int strob = 8;
int clock = 10;
int oe = 11;
int count = 0;
int dato = 0;

void setup()
{
 Serial.begin(9600);
 pinMode(data, OUTPUT);
 pinMode(clock, OUTPUT);
 pinMode(strob, OUTPUT);
 pinMode(oe, OUTPUT);
}

void PulseClock(void) {
   digitalWrite(clock, LOW);
   delayMicroseconds(20);
   digitalWrite(clock, HIGH);
   delayMicroseconds(50);
   digitalWrite(clock, LOW);
}

void loop()
{
  dato = 5;
  for (count = 0; count < 8; count++) {
   digitalWrite(data, dato & 01);
   Serial.write((dato & 01) + 48);
   dato>>=1;
   if (count == 7){
   digitalWrite(oe, LOW);
   digitalWrite(strob, HIGH);

   }
   PulseClock();
    digitalWrite(oe, HIGH);
}

 delayMicroseconds(20);
 digitalWrite(strob, LOW);
 delay(100);


 Serial.write(10);
 Serial.write(13);
delay(100);                  // waits for a moment
}




Any advice for the newbie?

Go Up