Skip to content

Support TLC5940 #18

Closed
Closed

Description

@sfranzyshen

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?

Activity

  1. focalintent commented on Jan 29, 2014

    @focalintent
    Contributor

    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.

  2. sfranzyshen commented on Jan 29, 2014

    @sfranzyshen
    Author

    16bit versions of the hsv and rgb classes is also something we'll need to get done.

    I'm guessing you mean 12bit?

  3. focalintent commented on Jan 29, 2014

    @focalintent
    Contributor

    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.

  4. tobiasebsen commented on Feb 10, 2014

    @tobiasebsen
    Contributor

    +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.

  5. focalintent commented on Feb 10, 2014

    @focalintent
    Contributor

    @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.

  6. tobiasebsen commented on Feb 10, 2014

    @tobiasebsen
    Contributor

    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?

  7. focalintent commented on Feb 10, 2014

    @focalintent
    Contributor

    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.

  8. focalintent commented on Feb 10, 2014

    @focalintent
    Contributor

    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)

  9. tobiasebsen commented on Feb 10, 2014

    @tobiasebsen
    Contributor

    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.

  10. focalintent commented on Feb 10, 2014

    @focalintent
    Contributor

    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 :)

  11. tobiasebsen commented on Feb 10, 2014

    @tobiasebsen
    Contributor

    thanks!

  12. sfranzyshen commented on Feb 11, 2014

    @sfranzyshen
    Author

    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?

  13. focalintent commented on Feb 11, 2014

    @focalintent
    Contributor

    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).

  14. sfranzyshen commented on Feb 11, 2014

    @sfranzyshen
    Author

    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 ...

  15. added this to the Future backlog milestone on Apr 17, 2014
  16. 3 remaining items

  17. pcharest2000 commented on Aug 22, 2015

    @pcharest2000

    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

  18. focalintent commented on Aug 25, 2015

    @focalintent
    Contributor

    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.

    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.

  19. pcharest2000 commented on Aug 25, 2015

    @pcharest2000

    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

  20. focalintent commented on Oct 3, 2015

    @focalintent
    Contributor

    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.

  21. mihow commented on Jan 13, 2016

    @mihow

    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

  22. focalintent commented on Jan 13, 2016

    @focalintent
    Contributor

    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)

  23. mihow commented on Jan 14, 2016

    @mihow

    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!

  24. heX16 commented on Dec 25, 2018

    @heX16
    Contributor

    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).

  25. nerdyscout commented on Feb 27, 2022

    @nerdyscout

    according to the chipset reference TLC5947 support is planned, but I guess this dead thread here is more correct... correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions