Shop OBEX P1 Docs P2 Docs Learn Events
Propellor to single TLC5940 — Parallax Forums

Propellor to single TLC5940

Jfuller000Jfuller000 Posts: 1
edited 2010-07-28 17:35 in Propeller 1
Has anyone used the TLC5940 driver with the Red, green and blue LEDs on a single channel?

As I am using the chip to drive some white and amber LEDs as well, it is more convenient to use a (channel,level) syntax rather than a (channel,R,G,B) type.
I have some code that works at the moment, but it seems rather inefficient - to control a single channel it uses (channel,value,0,0) which seems unlikely to scale well should I ever add more chips in the future?

Thanks,

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2010-07-28 17:35
    If I remember correctly when I used that chip, the different color leds were on different chips, i.e. the 1st chip red, 2nd green, etc.
    So it shouldn't be difficult to do a wrapper that takes your channel no/3 use that for the rgb channel, and the remainder says whether its r, g or b.
    The object I wrote just took the channel and rgb values and calculated an index into a memory buffer. Then there was a pasm cog that read the buffer and wrote to upto 27 chips. Changing the routine that writes into the memory buffer would change the led layout without needing to change the rest of the code.
Sign In or Register to comment.