Looking for library to control TLC5922

Hi,

I try to hack an old device which contain an TLC5922 (datasheet) led driver driven by SPI.

On this device there is 5 RGB lights, each light is composed in reality of 3 leds : R,G,B and each of this colored led is controlled by an output of the TLC5922.

On this device, the TLC5922 is connected like this :
image

I found libraries for a lot of TLC 592x but none of them seems to be perfectly compatible...

I think that I'm not really able to modify existing library with the datasheet so if someone has some advice or better if someone has already controlled a TLC5922 it could help a lot :wink:

Some libraries and code examples that I've tested :

This post is very interesting because it talk about TLC5922 . I tried some examples and I'm able to control ON/OFF all leds but no dimming. @ManjaLOL , if you read this :wink:

Good documentation for this library but I wasn't able to use it on TLC5922 (leds are on but behavior is aleatory)

This code in C for ATmega328p (not tested) use 4 TLC5922 to control a cube led :
http://bbpages.hopto.org/index.php?page=elektronika&subpage=ledcube_ekv

Easy to read library for tlc5928. The example has some effects on my TLC5922 but the protocol is probably not exactly the same.

Very promising sparkfun library. The led order is almost respected : I can switch off and on specific leds. Fades/brightness almost works too. But not a perfect control :

The adafruit TLC5947 library has some effects on my leds... but very aleatory behavior :laughing:

Interesting library which "can be configured to work with many other LED driver chips from the TLC59**" ... But not able to compile.

Thanks :slight_smile:

Another interesting source : I think that this code manage my device. It has been written for AVR but it's intersting to see how they write wit SPI protocole in the TLC5922 and how they convert 32 bit RGB into the 7 bit register of the TLC5922.

In association with this use of the function "set_led" :

With that I'm able to switch on / off leds separatly but not able to change colors or brightness in the right way for the moment.

I add two more documentation sources :
This topic by a guy who has similar difficulties :

And this source which is very interesting because it control a TLC5922 with an PIC18LF6525 but with more recent code than the previous AVR example :

I think that with all these it is possible to make something good.

EDIT : yes this last source was the good one :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.