Go Down

Topic: TLC5940 daisy chained (2x) cannot program second chip outputs (Read 362 times) previous topic - next topic



I have daisy chained 2x TLC5940 on a PCB board, but got a problem.
Therefor I've now broken down the complexity to testing with LEDs on a single breadboard like you can see in the attachment. During writing I've added a 100uF capacitor and 100nF on the power supply, but this has no effect. I'm using an external 5V power supply for powering the leds. Using 1k resistors for Iref - for current control / brightness LEDs)

In tlc_config.h (under libraries in the Arduino folder) I've changed num_tlcs from 1 to 2.

The wiring on breadboard is good because if I change the serial input wire from chip 1 to chip 2, the LEDs can be set/cleared without a problem (on a single chip).

Problem: It is not possible to control LEDs on the second chip when connecting Sout (chip1) to Sin (chip2). All other wires stay connected in parallel.

Important to mention is: LED 22 up to 29 stay lid no matter what as you can see on the photo... :smiley-confuse:

This is the code I'm using for testing:

#include "Tlc5940.h"

void setup()

void loop(){
Tlc.set(15, 4095);
Tlc.set(15, 0);

Just blinking 1 LED and works fine for CHIP 1.
If I change the code from 15 to 16 (CHIP 2, LED1 or OUTPUT0), nothing happens on CHIP2.
Except the outputs 22 up to 29 which are still pulled low, causing the LEDs to light...

I've tested multiple chips, libraries and Arduino versions, all doing the same.

Do you have any idea?


During writing I've added a 100uF capacitor and 100nF on the power supply,
Each chip needs a 100nF ceramic capacitor between power and ground as close to the chips as possible with as shorter leads as possible.

I can't see in the code where you tell the library how many chips you have.

There is either a call or you have to change a number in the library file.

Please read this:-
How to use this forum
Because your post is breaking the rules about posting code.



In tlc_config.h (under libraries in the Arduino folder) I've changed num_tlcs from 1 to 2. (see attachment)

Also please note I already have the 100nF on each chips power entry (close to chip) but this is not the cause. They do work ok individually...


This has been know to bite people now and then.

Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!


Yes I already know, but this is not causing any of the problems.
Are there any other suggestions about this issue?


Well this just leaves the circuit is not wired like you think it is. This could be due to a mistake in plugging in the wires to the wrong place or your solderless bread board not making good reliable connections.

You can check the latter by measuring the continuity between the chip's pins and where they are going to on the Arduino's processor pins. Do this of course with the power off.


Using Chinese "Dupont " or other jumper wires (do they make them anywhere else?  :smiley-roll: ) you do have to check them all for continuity.

Zigzag them all back and forth on a breadboard to a new column each time, then connect the end ones to 5 V on your Arduino in series with a LED and a 330 Ohm resistor.  If the LED lights, wobble them and see if it flickers.

If it does not work, connect to the halfway point of the zigzag instead, and repeat dividing them until you find the culprit.

Go Up