SparkFun Electronics Commentsurn:uuid:214d0e4e-f1b1-d287-ce26-ac5b4c9f82492024-03-29T00:32:32-06:00SparkFun ElectronicsScamp Dog on COM-10136 - TLC 5940 - PWM DriverScamp Dogurn:uuid:9465fe7d-ce4f-c3db-bc93-5836886425752015-10-11T19:29:14-06:00<p>I'm having trouble getting a sketch using the SparkFun_TLC5940 library to compile. Here's the error:<p>Arduino: 1.6.5 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"</p><p>In file included from /Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_animations.h:30:0,
from DisplayBoardTest.ino:2:
/Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_progmem_utils.h:32:27: error: variable or field 'tlc_setGSfromProgmem' declared void
void tlc_setGSfromProgmem(prog_uint8_t *gsArray);
^
/Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_progmem_utils.h:32:27: error: 'prog_uint8_t' was not declared in this scope
/Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_progmem_utils.h:32:41: error: 'gsArray' was not declared in this scope
void tlc_setGSfromProgmem(prog_uint8_t *gsArray);</p><p>OK, this looks like a typedef got left out, so I added the line "typedef uint16_t prog_uint8_t;" to tlc_animations.h. Now I'm having no luck getting the library to recompile. Poking around on the internet, I found some suggestions to delete the .o file, but I can't find where that hides out.</p><p>Any ideas on the next step?</p></p>
mistergreen on COM-10136 - TLC 5940 - PWM Drivermistergreenurn:uuid:fd1931e9-6e0d-7796-3962-2b67acca631e2014-12-28T14:58:28-07:00<p>Is there a 12 bit pwm driver that's not a current sink?</p>
Customer #562416 on COM-10136 - TLC 5940 - PWM DriverCustomer #562416urn:uuid:e25bee94-9c21-8067-26d8-cfad7639bfc32014-08-23T09:15:47-06:00<p>From Arduino Site:
This is a terrible gotcha that is not in the data sheet. Its so bad that I did not believe it until I verified it with TI support: If the chip does not have power, but the LED lines HAVE POWER, you WILL BLOW OUT OR DEGRADE THE CHIP!</p>
Customer #548339 on COM-10136 - TLC 5940 - PWM DriverCustomer #548339urn:uuid:5f5ae660-86fb-4f60-ecee-3415849b33c42014-07-03T20:32:27-06:00<p>I got 2 of these free from Texas Instruments samples, just found how good of a deal I got on them</p>
qcard on COM-10136 - TLC 5940 - PWM Driverqcardurn:uuid:58fe606b-7a67-96c2-f50e-475e49c908cc2013-10-29T09:29:35-06:00<p>Excellent resource, thanks!<p>I used your library to make a MIDI keyboard visualiser: <a href="http://mechinations.wordpress.com/2013/10/20/midi-keyboard-visualiser/" rel="nofollow">http://mechinations.wordpress.com/2013/10/20/midi-keyboard-visualiser/</a></p></p>
JustinRSharp on COM-10136 - TLC 5940 - PWM DriverJustinRSharpurn:uuid:77f8d2aa-185d-ea93-b9a1-3739f05876792013-07-27T09:58:42-06:00<p>Does anyone know if this is comparable to the A6276EA from Allegro Microsystems? My goal is to build a 8x8x8 led cube with an Uno. I guess I'm just wondering if this will do that. Do you have any docs or instructions from someone that's already tried it?<p>Thanks in advance,
A fellow geek</p></p>
Customer #450211 on COM-10136 - TLC 5940 - PWM DriverCustomer #450211urn:uuid:eb503ef9-fb6c-90c4-adae-bbbfc7b344b72013-07-14T09:30:59-06:00<p>Thanks! I love getting 3x more than I need with the message "please do not attempt to provide payment."</p>
krdarrah1234 on COM-10136 - TLC 5940 - PWM Driverkrdarrah1234urn:uuid:90cc8fd7-77c7-0076-4b80-1dbfa801aa3a2013-01-10T16:51:37-07:00<p>did a sort of a beginner's approach type tutorial on this IC. Definitely not as good (or polished) as some of the written guides, but it could be supplementary: <a href="http://www.youtube.com/watch?v=FehBLNHMlfo" rel="nofollow">http://www.youtube.com/watch?v=FehBLNHMlfo</a></p>
Miax on COM-10136 - TLC 5940 - PWM DriverMiaxurn:uuid:004f0974-ca66-90fb-61d1-dbbdac11bd602011-10-24T13:22:15-06:00<p>Thank you for posting this!! Very nice to have folks contributing to the community, I am currently de-mystifying the TLC5940 thanks to you. :)<br>
Cheers,<br>
Kris</p>
Customer #257312 on COM-10136 - TLC 5940 - PWM DriverCustomer #257312urn:uuid:8f7db79c-6413-9191-8147-04ca69ad17d32011-10-18T23:21:46-06:00<p>I read your book with great interest, thank you for publishing it. Like everyone else who bites off more than they can chew, I'm trying to build an LED music display. I'm hoping to use common anode RGB LEDs and assume that I use the schematic "usart_mspim-no_border_multiple.pdf" and wire up each LED to consecutive outputs of the 5940 ie 28-R, 1-G and 2-B and so on. I also have a nice 12V 4A power supply and want to use 3 LEDs in parallel for each "line" is this too much for the 5940 and would I still set the current to 20mA or use 60mA. I have lots of N channel mosfets, could I use these to wire it up as per the common cathode schematic? Thank for helping a beginner.</p>
Artcfox on COM-10136 - TLC 5940 - PWM DriverArtcfoxurn:uuid:ca058180-beca-d600-a61b-612d63f995322011-10-06T21:19:49-06:00<p>I wrote and published a free book that explains how to turn the datasheet and application notes for the TLC5940 into an unencumbered C library for use with an AVR microcontroller.<br>
The library uses the CLKO pin of the AVR to drive the GSCLK pin of the TLC5940 at up to 20 MHz, which allows you to update the grayscale values at up to 4882.8125 Hz (or even higher if you operate the TLC5940 in 11, 10, 9, or 8-bit modes).<br>
It also supports multiplexing common cathode (or common anode) RGB LEDs.<br>
The book, source code, Makefiles, schematics, and example projects are available here: <a href="https://sites.google.com/site/artcfox/demystifying-the-tlc5940" rel="nofollow">https://sites.google.com/site/artcfox/demystifying-the-tlc5940</a></p>
DangerCraft on COM-10136 - TLC 5940 - PWM DriverDangerCrafturn:uuid:b491ed98-9794-45b0-73dc-ec6349d24f332011-08-21T17:04:52-06:00<p>I prefer the TLC 5952, it has an internal oscilator and 24 channels to boot.</p>
emihackr97 on COM-10136 - TLC 5940 - PWM Driveremihackr97urn:uuid:878d76f3-8c79-34fc-b50e-cafb38b956c32011-08-17T12:37:07-06:00<p>Hi, just a tip: You can get this as free samples from Texas instruments, they will give you up to 5 of these, along with up to 5 of each of other 4 chips, each time!<br>
no need to pay $6 for 1, even the shipping is free, and fast, for me it take 3 days, and I live in Mexico!</p>
SomeGuy123 on COM-10136 - TLC 5940 - PWM DriverSomeGuy123urn:uuid:7c37324c-d9a8-12ed-0d70-89faade102442011-04-13T20:11:50-06:00<p>You're right. I didn't realize that.</p>
dreamlayers on COM-10136 - TLC 5940 - PWM Driverdreamlayersurn:uuid:56c663a1-ddb8-ec5f-0551-d66e855cb1cf2011-04-12T21:40:20-06:00<p>I don't like how this chip cannot do PWM on its own. It doesn't have an oscillator, and when it counts to 0xFFF, it stops, shuts off outputs and needs to be reset via BLANK.<br>
I got it working by using a TLC555 in 50% duty cycle configuration to provide GSCLK and capacitive coupling one of the outputs to BLANK to reset the counter. I used a 4.7 kohm pullup at the output, a 2.2 nF capacitor between the output and GSCLK, and a 100 kohm pulldown on GSCLK. I also added diodes to clip the signal at GSCLK to the power supply rails; those are probably unnecessary. It works reliably once started, but I'm not recommending this except as a temporary hack. I'm planning to use a microcontroller to generate the necessary signals.</p>
dreamlayers on COM-10136 - TLC 5940 - PWM Driverdreamlayersurn:uuid:1fee3ee7-78bd-d1c8-476e-5f4d73714cb42011-04-12T17:47:11-06:00<p>Because of the current regulation, you don't need any external resistors. Each TLC5940 output has its own current regulation, so brightness won't depend on the number of LEDs that are on. The only things you need to consider are the per channel current limit and the per chip power dissipation limit.</p>
dreamlayers on COM-10136 - TLC 5940 - PWM Driverdreamlayersurn:uuid:fae26b1c-7b5a-fc2e-9982-259fad2a322a2011-04-12T17:42:14-06:00<p>It is 120mA per channel with VCC > 3.6V and 60 mA per channel with VCC < 3.6 V. For larger currents, channels can be connected in parallel. There's also a power dissipation limit of 2456mW at TA < 25°C and less at higher temperatures.</p>
SomeGuy123 on COM-10136 - TLC 5940 - PWM DriverSomeGuy123urn:uuid:3d12beae-a6ce-23aa-901b-8cad5a6035ce2011-04-10T15:45:57-06:00<p>Yeah, but there is a problem with that. The more LEDs you turn on, the dimmer they will all be. Having all your LEDs connected with their own resistors means that the brightness will not be affected by the number of LEDs on at that moment.</p>
Rengers on COM-10136 - TLC 5940 - PWM DriverRengersurn:uuid:5b7f74b8-7dac-1b48-82e8-1609495da1a32011-03-14T16:17:23-06:00<p>I'm trying to comprehend the datasheeet, but there's on thing I can't figure out:<br>
Does this IC have have a total max output current of 120mA, or is it 120mA per channel?</p>
AaronW on COM-10136 - TLC 5940 - PWM DriverAaronWurn:uuid:08a7d617-9254-26e8-37da-d559177decf72011-02-12T01:52:44-07:00<p>The first micro project I built was 48ch led controller, used 3 of these and a Picaxe 28X1 so I know for fact that these work with Picaxe but I did need to uses a decade counter to generate all the necessary clocking signals because of the inability of the Picaxe to generate 2 different frequency of PWM.</p>
EmilioG on COM-10136 - TLC 5940 - PWM DriverEmilioGurn:uuid:cb3b9433-46f0-244b-03c9-1a97181bbf2f2011-01-02T21:19:03-07:00<p>I don't think it's so much ordering the part as it is finding the part. Both Mouser and Digikey assume that you know the exact part you need and that you know the "industry" name of your part. Sparkfun assumes much less technical knowledge and is thus much more attractive for the hobbyist or someone who is still learning.</p>
Rogue on COM-10136 - TLC 5940 - PWM DriverRogueurn:uuid:be1d5b2d-2c94-8955-c925-caf72ddc28162010-12-15T12:06:25-07:00<p>I admit it would be nice to see these at ~$5 but props to Sparkfun for carrying these and exposing peeps to them. Shipping costs are another factor so its not black n white as made out to be. Lastly, most people will only need one or two of these ICs I imagine.</p>
benuk on COM-10136 - TLC 5940 - PWM Driverbenukurn:uuid:ce069a7f-13bc-725b-8ab4-186e625367002010-11-14T16:28:15-07:00<p>You should check this out <a href="http://micromegacorp.com/umpwm1.html" rel="nofollow">http://micromegacorp.com/umpwm1.html</a><br>
8PWM in, 8PWM out!</p>
Ryan6 on COM-10136 - TLC 5940 - PWM DriverRyan6urn:uuid:b4b90bc4-572c-8161-9d4c-8ce71a00d5592010-10-28T05:29:53-06:00<p>Uh, how is ordering from Mouser or digi-key any harder than sparkfun? You just type in the part number, add it to your cart and check out... Just like here... I would say its nice to support sparkfun's other products by throwing a couple of these in my cart when ordering something else. That I can understand and use to justify the markup.</p>
Ryan6 on COM-10136 - TLC 5940 - PWM DriverRyan6urn:uuid:b2da0621-415f-3d48-590b-a715cc5aa1682010-10-28T05:23:02-06:00<p>Agree with that. Free or $2 cheaper... But hey, people love to throw money away.</p>
ddd999 on COM-10136 - TLC 5940 - PWM Driverddd999urn:uuid:8472f9bf-35fe-f8e4-5426-156a743bee262010-10-24T11:42:33-06:00<p><strong><a href="account.php?id=116179" rel="nofollow">RichardInVA</a>:</strong> <em>Is the serial protocol for this device proprietary? I'd like to use this with a PICAXE because I don't want to pot an Arduino, but I'm not sure the PICAXE would be able to generate the serial signal for it.</em><br>
The protocol is fully documented in the datasheet.</p>
BB on COM-10136 - TLC 5940 - PWM DriverBBurn:uuid:d6d0b0e4-a6d6-9279-522e-409007b720ba2010-10-23T13:41:55-06:00<p>Why are these TLC5940NT chips hard to get, even sometimes? You can get some for free through TI's sampling program, and they're in abundance and substantially cheaper when buying them from the larger parts distributors like Mouser.</p>
RichardInVA on COM-10136 - TLC 5940 - PWM DriverRichardInVAurn:uuid:3c113ab2-2c3a-af5e-7784-253bc82955262010-10-22T14:37:51-06:00<p>Is the serial protocol for this device proprietary? I'd like to use this with a PICAXE because I don't want to pot an Arduino, but I'm not sure the PICAXE would be able to generate the serial signal for it.</p>
Mr.Sharumpe on COM-10136 - TLC 5940 - PWM DriverMr.Sharumpeurn:uuid:eb9aede1-4a26-d425-7231-8722bb75c2222010-10-21T16:45:03-06:00<p>Yay! I'm just getting started with physical computing stuff, and as such am doing a lot of LED-based projects. I have a few of these that I ordered from Mouser but their site assumes a lot of knowledge and is a bit intimidating (to me). I prefer to order from Sparkfun and Adafruit, so I'm glad to see these here!</p>
JoshFranz on COM-10136 - TLC 5940 - PWM DriverJoshFranzurn:uuid:b767293c-23fd-6400-f199-8eaf494416fa2010-10-20T07:13:16-06:00<p>Awesome! Next step: Get the SMD version!<br>
...please?</p>
ao on COM-10136 - TLC 5940 - PWM Driveraourn:uuid:c24a74f9-10de-e0e7-62ba-1050315030592010-10-14T09:44:11-06:00<p>Great to see you carrying this sometimes-hard-to-get chip!</p>
JohnBoxall on COM-10136 - TLC 5940 - PWM DriverJohnBoxallurn:uuid:ba9ddee6-6bea-bc0b-be30-e1686c35d74c2010-10-12T21:17:22-06:00<p>These are a great IC, very simple to use with Arduino and can sink current from LEDs without each having their own resistor. More at <a href="http://wp.me/pQmjR-Ey" rel="nofollow">http://wp.me/pQmjR-Ey</a></p>