You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to help to get the TLC5940 support started ... but I am confused as to how to. Is there anyone else who is working on this (tlc5940) support or another chip that I could see how adding a chip is done? Is there a mailing list or forum where developers meet?
There's only two of us on development (intentionally keeping the size small, so no open dev list - just a g+ community for support). I have a tlc5940 setup here to start putting support in for it. The bigger problem with the tlc5940 is that it is a 12bit chipset - and all the rgb/hsv work internally is 16 bit, while I have a plan for faking it with 8bit support getting (efficient) 16bit versions of the hsv and rgb classes is also something we'll need to get done.
No, I mean 16-bit. I'm not going to try to support/do 12-bit math for the CRGB and CHSV classes (the cpus that we support, that i'm often hand-writing assembly for, have 8 bit math instructions and 16 bit math instructions (and sometimes 32 bit math instructions), but not 12 bit). Also - memory management for 12-bit structures is a nightmare, 16-bit would actually be more efficient all around. We can dither 16-bit CHSV/CRGB classes down to 12-bit to write out to things like the tlc5940 - but i'm also expecting to (eventually) see 16-bit rgb leds in the next year or two, if the controllers aren't out there already, so i'm thinking ahead as well.
I have a 12-bit-per-channel chipset (not TLC5940) from a Chinese manufacturer that I would like to use. I was considering making some changes to clockless.h myself, but I'd much rather have it done by someone who knows it well. Thanks.
It's a completely new chip called TM-GW6205. It has 3 channels of 12 bits.
As you said, there may be comming a lot more 12 or 16 bit controllers in the future, so it's best to make some generic support for these chips. Maybe supporting both byte or short data by ether shifting left or right?
There's a separate issue for the CHSV16/CRGB16 - which is the "generic support" - however, each specific chip will need its own configuration and such beyond that.
Also - if you have a datasheet for the TM-GW6205 - could you create a new issue for the TM-GW6205 support and a link to the datasheet (if not the datasheet itself)
Well, I'm not sure that I am allowed to post the datasheet publicly since I got it directly from the manufacturer. Also, the clip isn't available for customers yet.
My point is just that 12-bit support would be nice for me and possibly for supporting more future chipsets.
Could you email me the data sheet (danielgarcia at gmail)? If it's straightforward enough I can do a quick and dirty prototype for you (doing 8-12bit mapping). (Technically speaking, it won't be 12 bit support, it'll be 16 bit support, but easy to dither down to it :)
I have noticed some changes in fastled2.1 (Preliminary test support) for the GW6205 (12bit) chipset ... it looks as if you have a work around for the 8bit - 12bit mapping ... couldn't the same be done for the tlc5940?
If the only thing holding back tlc5940 support was 12 bit - sure, however the tlc5940 uses a different protocol than anything else I'm supporting, and requires some extra changes,while the ge6205 (which is only supported for avr at the moment, because someone has a test setup) is nearly identical to the ws2812 outside of being 12bit and a slight shift of timing.
(Also, I both have a day job and am currently traveling so I don't have access to my tl5940 parts).
I didn't mean to question your quantity of work. I (and so many others) are grateful for all of the work your team is doing. I didn't realize the extent of the differences between the tlc59xx and other chipsets. So, I apologies if I was coming off as pushy ...
focalintent and kriegsman: The tlc5940 can be used in 8 bit without mapping to 16 bit. The trick is to fill the 12 bit data with 8 bit pwm value and then trigger the blank signal when you have saturated the 8 bit value. I have done this on several of my project on Avr and Arm cortex. This consumes very little resources since the GSCLK and Blank signal are all generated thru PWM. Also using SPI on AVR when sending one byte you have about 18 cycles between SPI send. This gives just enough time to built the "12 bit" packed stream between SPI send. The TLC5940 could be supported without touching the base code color functions of FastLed, of course you don't get 12 bit resolution on the TLC 5940 but who really cares? I do not understand why such a high resolution was used for this IC by TI, I don't think the normal human can spot the difference between 8 bit and 12 bit color value....
Doing more research into the TLC5940, and I'm inclined to close this off and not add support for the TCL5940 to the library, for multiple reasons:
there is no consistent RGB ordering, requiring users to wire their leds up in a predictable fashion (aka, this will be a support nightmare for me of dealing with people who wire up their leds in strange ways)
it requires coordinating latch/blanking pins to lock data in, this adds to the number of pins that need to be part of the configuration and may also require setting up interrupts to handle things properly (I'm fairly uninterested in having FastLED rely on interrupts for functionality, especially at an led chipset level - there's over a half dozen low level architectures supported, I don't want to have to re-implement tlc5940 specific handling for each of them)
and the one that is the real killer - the TLC5940 does not do its own PWM, it requires an external clock to generate the timing signal. This requires generating a high speed PWM pulse from the MCU to drive the data. Not all the MCU's supported by FastLED even have hardware PWM as an option (for example, the nrf51822 used by the rfduino). This falls into a similar line as the interrupt handling for the blanking/latching. Not something that I want to repeat an implementation of a half dozen for supporting one chipset.
I killed off support for the LPD6803 because I didn't want to have to drive a clock line from the MCU constantly. As far as I can tell, other than 12-bit pwm support, there isn't any driving reason that I can think of to support the TLC5940 going forward.
I completely agree with your assessment. I don't want to sound like an ass but for the average user the TL5940 is complex to wire up compared to current supported led drivers by fastled (1,2,3 wire)...
Not going to support the TLC* chipsets - I ripped out host-drive PWM support years ago from FastLED (rip, LPD6803) and have no interest in putting it back in.
Yeah - I found that and now have 59747 and 59711 support planned - now I just need the time and space to do it (in part, I'm waiting to implement more major chipsets until I finish some internal juggling in the library, which i'm hoping to get to next week)
Ah good to hear. I'm using currently using a few TLC5947s with the basic Adafruit library, but would love to try FastLED and some of the wave functions if support happens. Great work overall!
LPD6803 do not require external clocks! (external clock is the optional mode of this chip).
I add support LPD6803 and its work perfect with leds from aliexpress (and with out external clock).
Activity
focalintent commentedon Jan 29, 2014
There's only two of us on development (intentionally keeping the size small, so no open dev list - just a g+ community for support). I have a tlc5940 setup here to start putting support in for it. The bigger problem with the tlc5940 is that it is a 12bit chipset - and all the rgb/hsv work internally is 16 bit, while I have a plan for faking it with 8bit support getting (efficient) 16bit versions of the hsv and rgb classes is also something we'll need to get done.
sfranzyshen commentedon Jan 29, 2014
I'm guessing you mean 12bit?
focalintent commentedon Jan 29, 2014
No, I mean 16-bit. I'm not going to try to support/do 12-bit math for the CRGB and CHSV classes (the cpus that we support, that i'm often hand-writing assembly for, have 8 bit math instructions and 16 bit math instructions (and sometimes 32 bit math instructions), but not 12 bit). Also - memory management for 12-bit structures is a nightmare, 16-bit would actually be more efficient all around. We can dither 16-bit CHSV/CRGB classes down to 12-bit to write out to things like the tlc5940 - but i'm also expecting to (eventually) see 16-bit rgb leds in the next year or two, if the controllers aren't out there already, so i'm thinking ahead as well.
tobiasebsen commentedon Feb 10, 2014
+1 for 12-bit support !!
I have a 12-bit-per-channel chipset (not TLC5940) from a Chinese manufacturer that I would like to use. I was considering making some changes to clockless.h myself, but I'd much rather have it done by someone who knows it well. Thanks.
focalintent commentedon Feb 10, 2014
@tobiasebsen what chipset do you have? If it's the LPD1886 - I have a strip of those as well and will want to be adding support in there too.
tobiasebsen commentedon Feb 10, 2014
It's a completely new chip called TM-GW6205. It has 3 channels of 12 bits.
As you said, there may be comming a lot more 12 or 16 bit controllers in the future, so it's best to make some generic support for these chips. Maybe supporting both byte or short data by ether shifting left or right?
focalintent commentedon Feb 10, 2014
There's a separate issue for the CHSV16/CRGB16 - which is the "generic support" - however, each specific chip will need its own configuration and such beyond that.
focalintent commentedon Feb 10, 2014
Also - if you have a datasheet for the TM-GW6205 - could you create a new issue for the TM-GW6205 support and a link to the datasheet (if not the datasheet itself)
tobiasebsen commentedon Feb 10, 2014
Well, I'm not sure that I am allowed to post the datasheet publicly since I got it directly from the manufacturer. Also, the clip isn't available for customers yet.
My point is just that 12-bit support would be nice for me and possibly for supporting more future chipsets.
focalintent commentedon Feb 10, 2014
Could you email me the data sheet (danielgarcia at gmail)? If it's straightforward enough I can do a quick and dirty prototype for you (doing 8-12bit mapping). (Technically speaking, it won't be 12 bit support, it'll be 16 bit support, but easy to dither down to it :)
tobiasebsen commentedon Feb 10, 2014
thanks!
sfranzyshen commentedon Feb 11, 2014
I have noticed some changes in fastled2.1 (Preliminary test support) for the GW6205 (12bit) chipset ... it looks as if you have a work around for the 8bit - 12bit mapping ... couldn't the same be done for the tlc5940?
focalintent commentedon Feb 11, 2014
If the only thing holding back tlc5940 support was 12 bit - sure, however the tlc5940 uses a different protocol than anything else I'm supporting, and requires some extra changes,while the ge6205 (which is only supported for avr at the moment, because someone has a test setup) is nearly identical to the ws2812 outside of being 12bit and a slight shift of timing.
(Also, I both have a day job and am currently traveling so I don't have access to my tl5940 parts).
sfranzyshen commentedon Feb 11, 2014
I didn't mean to question your quantity of work. I (and so many others) are grateful for all of the work your team is doing. I didn't realize the extent of the differences between the tlc59xx and other chipsets. So, I apologies if I was coming off as pushy ...
3 remaining items
pcharest2000 commentedon Aug 22, 2015
focalintent and kriegsman: The tlc5940 can be used in 8 bit without mapping to 16 bit. The trick is to fill the 12 bit data with 8 bit pwm value and then trigger the blank signal when you have saturated the 8 bit value. I have done this on several of my project on Avr and Arm cortex. This consumes very little resources since the GSCLK and Blank signal are all generated thru PWM. Also using SPI on AVR when sending one byte you have about 18 cycles between SPI send. This gives just enough time to built the "12 bit" packed stream between SPI send. The TLC5940 could be supported without touching the base code color functions of FastLed, of course you don't get 12 bit resolution on the TLC 5940 but who really cares? I do not understand why such a high resolution was used for this IC by TI, I don't think the normal human can spot the difference between 8 bit and 12 bit color value....
Phil
focalintent commentedon Aug 25, 2015
Doing more research into the TLC5940, and I'm inclined to close this off and not add support for the TCL5940 to the library, for multiple reasons:
I killed off support for the LPD6803 because I didn't want to have to drive a clock line from the MCU constantly. As far as I can tell, other than 12-bit pwm support, there isn't any driving reason that I can think of to support the TLC5940 going forward.
Folks who want to use the TLC5940 w/FastLED's math/color functions can use FastLED to do all the pre-writing data out manipulation, then use something like the TLC5940 library for actually driving the leds - https://code.google.com/p/tlc5940arduino/
Unless someone can give me a good, compelling reason to reconsider, I'm going to close this ticket in a few days.
pcharest2000 commentedon Aug 25, 2015
Daniel,
I completely agree with your assessment. I don't want to sound like an ass but for the average user the TL5940 is complex to wire up compared to current supported led drivers by fastled (1,2,3 wire)...
Phil
focalintent commentedon Oct 3, 2015
Not going to support the TLC* chipsets - I ripped out host-drive PWM support years ago from FastLED (rip, LPD6803) and have no interest in putting it back in.
mihow commentedon Jan 13, 2016
After doing more reading, turns out the TLC5947 and TLC59711 do not require external clocks. Only the TLC5940 requires an external clock, and is different in multiple ways. Here is one thread about the 3 chips: https://forums.adafruit.com/viewtopic.php?f=19&t=66635&sid=b2bf261201c64729db7895e4481d23e7#p337802
focalintent commentedon Jan 13, 2016
Yeah - I found that and now have 59747 and 59711 support planned - now I just need the time and space to do it (in part, I'm waiting to implement more major chipsets until I finish some internal juggling in the library, which i'm hoping to get to next week)
mihow commentedon Jan 14, 2016
Ah good to hear. I'm using currently using a few TLC5947s with the basic Adafruit library, but would love to try FastLED and some of the wave functions if support happens. Great work overall!
heX16 commentedon Dec 25, 2018
LPD6803 do not require external clocks! (external clock is the optional mode of this chip).
I add support LPD6803 and its work perfect with leds from aliexpress (and with out external clock).
nerdyscout commentedon Feb 27, 2022
according to the chipset reference TLC5947 support is planned, but I guess this dead thread here is more correct... correct?
docs(esp32): ship `tools/sdkconfig_for_smallest_fastled.defaults` ove…