Go Down

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


Hey, does anyone know how I can add more led drivers to this example?
It mentions hooking up more drivers to be able to connect an "almost endless" amount of LEDs with only 4 pins. Of course, this would be very nice to know more about :) If anyone can help out, I'd be grateful.
Reading the datasheet didn't make me much smarter unfortunately...


In the figure 6 page 8 from 4794's datasheet, you will find an example of cascading driver (up to 16 LED with 2 drivers).
Of course you can repeat the cascade (extend the daisy chain) by adding more 4794 circuits in the same manner.

You must modify the program to control new leds. You need more PulseClock(). You can extend the for loop (up 16 with 2 x 4794) and change : if (count == 7){   to   if (count == 15){ .



Thanks for the help! Will try this out. Btw, is there any limit to how many 4794's one can daisy chain?


Conceptually none.
Electricaly, problem can occur if you have an ouput which drive lot input (here EO, STR and CP), this is the fanout limit (one ouput can drive only a limited number of inputs, current (from output) is subdivided beetween inputs).
Up to 10 ten circuits will be OK, for more it's better to regenerate signals.


Oct 18, 2006, 03:18 am Last Edit: Oct 18, 2006, 06:35 am by liranik Reason: 1
hi, i am trying to connect the circuit with philips 4794 led driver http://www.arduino.cc/en/Tutorial/LEDDriver

for some reason only the first led is lit. i checked all the wiring ten times --
data (arduino pin #9 / LED driver pin #2)
strob (arduino 8 / LED driver 1)
clock (arduino 10 / LEd driver 3)
oe (arduino 11 / LED driver 15)

I use pins 4-7 and 11-14 as output / led pins on the LED driver; LEDs are connected with anodes to 5V, cathodes to driver pins via resistors. ground and 5V are wired correctly, chip orientation is correct... am i missing anything?

thanks a lot for all help in advance!


Hello all,

I drew a quick visual to help everyone out who is new.  I am new myself as in I just found this project today. So I am not 100 percent sure if it's correct but it looks right from what I can tell.   If you look at the source code for the LED driver board

int data = 9;
int strob = 8;
int clock = 10;
int oe = 11;
int count = 0;
int dato = 0;

the INT = X correlates with the number on the Arduino board.  Once you see this, everything else seems to fall into place.  Take a look at the images below.  I hope this helps.   Also inorder to daisy chain more 4794 LED driver boards, Pin 9 and Pin 10 look like the pins to connect to the next 4794 LED Driver as showen in the Datashate

http://webzone.k3.mah.se/projects/arduino-workshop/upload/default.asp?folder=28 Download: hef4794b.pdf

Also note, I turned the Arduino Diagram upside down in the diagram to better suit the way the picture was taken.  

take care


Mar 07, 2009, 07:40 pm Last Edit: Mar 07, 2009, 07:41 pm by SenorSlugworth Reason: 1

pay close attention to what your dato value is.

to reiterate from the original example:
"if dato is 255 all the LEDs will light up."

Has anyone attempted to use the 4794 and an acceleromoter (specifically the memsic 2125)?

I have each working on their own.  
Not sure how to consolidate the hardware/code.



Hi there,

I am new to Arduino, and I am also trying to complete this example.

I have the circuit breadboarded, but the circuit simply will not work.

The circuit is complete, except for what I am assuming are diodes (?) between the current and the LEDs.

Are these crucial to the circuits operation?

The TX light also blinks, and I'm not sure what that means exactly.

I have posted photos here:


Any help would be greatly appreciated,



The resisters are not 100% necessary.

If there is to much power going into your LEDs you will learn the hard way.

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



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

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

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.


The resisters are not 100% necessary.

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

Some people like the smell of magic blue smoke ;)



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


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()
 pinMode(data, OUTPUT);
 pinMode(clock, OUTPUT);
 pinMode(strob, OUTPUT);
 pinMode(oe, OUTPUT);

void PulseClock(void) {
   digitalWrite(clock, LOW);
   digitalWrite(clock, HIGH);
   digitalWrite(clock, LOW);

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

    digitalWrite(oe, HIGH);

 digitalWrite(strob, LOW);

delay(100);                  // waits for a moment

Any advice for the newbie?

Go Up