TLC5940 led driver on Teensy 4.0

Hello everyone, I'm trying to interface the TLC5940 to teensy 4.0.
I used the pins shown on this page:

https://www.pjrc.com/teensy/td_libs_Tlc5940.html

where, for design reasons I used pin 9 instead of 7 for the SCLK signal.

the pins to be reassigned with respect to the base pins of the sketches
edit here:
https://github.com/PaulStoffregen/Tlc5940/blob/master/pinouts/Teensy_KinetisK20.h

but when I assemble the program the error is:

#error "Unknown Chip!"

I think Because the 4.0 processor is not listed in the library.

Any suggest?

Thanks a lot
ScopeMaster
 
Exactly the same issue here. I'm trying to use with Teensy 4.1.

I believe from another thread that the TLC5940 uses MCU specific code for speed.

Fingers crossed Teensy 4.x is added!
 
Hi, unfortunately I have the same problem, I have a teensy 4.1 and I cannot get the TLC5940 to work ... Did you find a solution?
 
Hi, unfortunately I have the same problem, I have a teensy 4.1 and I cannot get the TLC5940 to work ... Did you find a solution?

No I haven't. But I'm convinced it won't work unless specific code is written for this processor. In the end I used a Atmega 328p to talk to the TLC5940 and talked to the Atmega from the Teensy via i2c. It actually helped in that I could simplify the commands and put all the timing code (i put fades on LEDs) on the Atmega so my main code runs nice and simple. Not perfect for every situation but worked for me... Hope this helps.
 
Would it work to reassign the sclk pin from pin 7 on the teensy 4.1 to pin 9 on the teensy?

I'm using an I2S chip alongside the TLC5940 and the SDATA out for I2S is on pin 7...
 
Yes, changing pin 7 to pin 9 should be fine. It accesses that pin as normal GPIO, so any digital pin should be able to work if you edit the library header files.

Pins 2, 3, 5 are the ones which can't be easily reassigned, because they're controlled by timers specific to those pins.
 
Back
Top