Go Down

Topic: Daisy chaining from a TLC5947 to a TLC5940 (Read 1 time) previous topic - next topic


For SPI? AFAIK SPI does not use (need) a timer. Anyway Arduino has 3 timers. Timer0 is used for millis() and is better to keep untouched. Timer1 and Timer2 are free to use (but it breaks corresponding PWM).
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0


ok if i must use two timers... how would i set it up?


I used a couple of TLC5940's a while ago, and used a 12 stage binary counter to provide a blank pulse.

I'm not 100% sure anymore, but I think I remember this gave me only 11 bit resolution, as it gives a blank pulse and resets every half cycle of Q11, so maybe you need a 13-stage counter to get full 12 bit duty cycle resolution.


I gave up D: Hacking in a third tlc5947 :( 

Though thanks jobi will keep this in mind if i use the chips for another thing later down the line... 11bit is perfectly fine for my uses tbh... 8bit would be fine too :p


Take a look at the Sparkfun Library for the TLC5940, it's available on Github.
You can see how they setup the timers there, it's actually pretty easy.

Also, the lack of an internal oscillator is a feature rather than a nuisance: It allows you to multiplex a matrix of LEDs by chaining e.g. a single HC595 with the TLC and then syncing XLAT and Blank to switch planes.

OR you could artificially lower the PWM resolution in exchange for a higher PWM frequency.

These are just two examples, I'm sure people could come up with more...
The 5940 may be a bit more difficult to set up than e.g. the 5947, but you get a lot more versatility in turn.

Go Up