Library for TLC5940 16-channel PWM chip

just assign the value of 4095 to the correct pin.
this should result in the led being constantly on.

its not about constantly turning on a led but rather using a pin of the TLC as GND for multiplexing stuff...

from my understanding the output always has to pass thru the constant current driver.

However you could pull up the output to vcc then a value of 4095 should make the output gnd allowing you to turn on and off a transistor... i think...

I am currently doing multiplexing by using npn transistors to selectively turn on the red-green-blue parts of a RGB common cathode led.

there is also a tlc5940mux library however i have never used it.

Hi all,

I'm using a PIC to control the TLCs, but still in principle it the same as the arduino. The only problem is the LEDs flicker. Does anybody know why this happens? I am programming at 48MHz, but still it's flickering. I am not using any interrupts. Should I use interrupts?

i know this is an old thread now... but i'm having a helluva time finding these chips online. if anyone has any leads or extras their willing to sell that would be great.

email is best but a PM would work as well.

thanks.
Ken

Try TI directly! They'll send you free samples if you're lucky! (ti.com) Dani

has anyone used the tlc5940 with i2c at the same time. im trying to and getting corrupt data when receiving. Serial works just fine at speeds of 115200 but i2c does not work.

I'm having the same problem.

I'm running I2C between two arduinos, and the Master_Send and Slave_receive examples work perfectly. That is, until I add the slave_receive code to my Arduino running the TLC...

I commented out everything related to the TLC, and it worked. Adding things back in one at a time (headers, global variables, etc.) worked until I hit Tlc.init(); At which point I2C died.

Could you find a solution, joe? (or anyone?)

Hi everyone i am interested in doing a 16x16 display with the TLC but i am not quite sure about what baud rate should I use.
I'm planing on sending the data from my computer and it seems i'll have to send the data directly to the TLC, so can anyone give me more info about the baud rate I should use. What is the maximum baudrate that the TLC can work, how many stop bits, should i include a 9th parity bit?
Thanks a lot in advance for your help

the tlc5940 runs off an spi bus. not serial.

OK i get it now, but still my initial plan is wailing me. I was planing to update the picture from the computer and change it during execution, but it seems almost impossible to be done in time. :cry:
I will have to have my picture stored in the microprocessor before I start displaying it. :-[
Is that what all you guys are doing or are you actually able to change the image trough some kind of communication with a computer?

well then ill show you something its possible.
im sending RGB as bytes to the atmega168 over serial then sending it to a master Atmega168 via i2c. ill post more info later

ill upload a video of my full project later today or this week

Heres my project using 7 tlc5940's to control 112 led's

WOW. Well done, Joe! I love it!

Where's the code? :wink:

Do you have any close-ups of the individual cells? It looks like you have the LEDs mounted to the sides of the boxes, rather than the bottom.

Something like this has been on tap for me, for a while now...I just need the time and resources to do it.

Excellent craftsmanship, as well as programming!

EDIT: Hang on...how many TLCs are you using? you said 7 TLCs, which is 112 LEDs max. But there are 112 cells in your table, which should be 336 LEDs, and 21 TLCs. Are you multi/charlieplexing them?

multiplexing the anodes of common cathode led's

ill make a large exhibition post tonight at link to it here.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266369410/0#0

theres my exhibition post.

if you have questions regarding my specific application please direct them there

I was wondering if this library would also work with one of the following chips:

TLC5941 - TLC5941 data sheet, product information and support | TI.com
TLC59401 - TLC59401 data sheet, product information and support | TI.com

And if they could be used would it also be possible to mix them? I.e. have 2 TLC5940's + 2 TLC5941's + 2 TLC59401's working together.

Personally I don't see a whole lot of differences between them comparing their datasheets. Pin configuration seems identical as is the way they are controlled.

The only differences I could find:
TLC5940: EEPROM and 60mA (Vcc [ch8804] 3.6V) / 120mA (Vcc > 3.6V) drive (per channel)
TLC5941: NO EEPROM and 80mA drive (per channel)
TLC59401: NO EEPROM and 80mA (Vcc [ch8804] 3.6V) / 120mA (Vcc > 3.6V)

I just got some TLC5941's and have run a couple of the examples in the library. So far I haven't run into any problems.

Thanks AC great library.

Is it possible to control the brightness of each channel?
If yes can someone please provide a sample of where they have done it?

Or

Would it be easier to have another chip controlling a say mosfet to control each intensity.

Right now my setup is 3 TLC -> (3)Mosfets -> (1)RGB_LED

I thought about adding in a 4th TLC to control the common for intensity.

Let me know,
Ram

Oh yes one more question.

Is it possible to bitshift or do something to turn 0 into 4096 and 4096 into 0 for n channel fets?

int i = 2000;
int inverse = abs(i-4096); //subtracting 4096 makes it inverse, but negative, abs converts negative to positive, making the conversion complete

Hope that helps =)