Hi folks, I've daisy chained two Tlc5940s for a mood lamp project of mine; hoping to involve it in a home automation project. But they are acting in a very peculiar way!
It seems if I have any more than 6-8 channels out of the 32 available set to non-zero then all the lights flash in a horrific, vomit inducing fashion. For example, these work fine:
-Fade each channel all the way up, and then all the way down in turn.
-Take six channels next to each other (or separated, although I haven't tested this yet), and fade them all up.
Because of this behaviour, I struggle to think that it's the hardware that is at fault, unless the more the channels addressed the greater the data sent and there is suddenly some kind of interference...? I can control each channel perfectly, just not all together.
I'm pretty sure that my code is ok, but I think I may have not sorted out the config.h file properly, all I've done is change NUM_TLCS to 2 instead of 1. The reason I'm pretty sure my code is ok is because if I set Tlc.init(0), I can address channels on there own, as long as no more than around 6 are non-zero. But if I set Tlc.init(1-4095) everything goes crazy!
Also, I tested each Tlc5940 on its own and they worked great, I could address all channels together with no crazy lights. It's only now they are chained together it doesn't seem to work.
I currently have a capacitor between ground and +5v.
I'm driving the led's of a 12v supply (it's a RGB strip light).
So, either the Tlc5940 library is wrong (which it seems pretty clear it isn't!), my wiring is wrong (which doesn't seem to make sense, as I can control each channel on its own fine), my Tlc5940s are bad (again...unlikely seeing as I tested them separately)...oorrrrrrr there is some interference I'm missing?! There is a good meters worth of wire between the end Tlc5940 and the Arduino?
That, or I'm missing something in the Tlc5940 library?
I hope I've been clear! I know it's best to try and give the most information possible. I'd really appreciate any help you guys can give me as it's really bugging me! Would be nice if I was missing something really obvious.
Deeksie