TLC 5940 - PWM Driver

The TLC5940 is a 16 channel PWM unit with 12 bit duty cycle control (0 - 4095), 6 bit current limit control (0 - 63), and a daisy chainable serial interface. It is handy for expanding the number of PWM outputs available.

  • 16 Channels
  • 12 bit (4096 steps) Grayscale PWM Control
  • Serial Data Interface
  • 30MHz Data Transfer Rate
  • CMOS Level I/O
  • Drive Capability (Constant-Current Sink)
    • 0mA to 60mA (VCC < 3.6V)
    • 0mA to 120mA (VCC > 3.6V)
  • 3V to 5.5V VCC

TLC 5940 - PWM Driver Product Help and Resources

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

2 Soldering

Skill Level: Rookie - The number of pins increases, and you will have to determine polarity of components and some of the components might be a bit trickier or close together. You might need solder wick or flux.
See all skill levels


Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

2 Programming

Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

3 Electrical Prototyping

Skill Level: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • krdarrah1234 / about 11 years ago * / 2

    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: http://www.youtube.com/watch?v=FehBLNHMlfo

  • Artcfox / about 13 years ago / 2

    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.
    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).
    It also supports multiplexing common cathode (or common anode) RGB LEDs.
    The book, source code, Makefiles, schematics, and example projects are available here: https://sites.google.com/site/artcfox/demystifying-the-tlc5940

    • qcard / about 11 years ago * / 1

      Excellent resource, thanks!

      I used your library to make a MIDI keyboard visualiser: http://mechinations.wordpress.com/2013/10/20/midi-keyboard-visualiser/

    • Miax / about 13 years ago / 1

      Thank you for posting this!! Very nice to have folks contributing to the community, I am currently de-mystifying the TLC5940 thanks to you. :)
      Cheers,
      Kris

    • Member #257312 / about 13 years ago / 1

      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.

  • DangerCraft / about 13 years ago / 2

    I prefer the TLC 5952, it has an internal oscilator and 24 channels to boot.

  • emihackr97 / about 13 years ago / 2

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

    • Member #450211 / about 11 years ago / 1

      Thanks! I love getting 3x more than I need with the message "please do not attempt to provide payment."

  • dreamlayers / about 13 years ago / 2

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

  • Scamp Dog / about 9 years ago / 1

    I'm having trouble getting a sketch using the SparkFun_TLC5940 library to compile. Here's the error:

    Arduino: 1.6.5 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

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

    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.

    Any ideas on the next step?

  • mistergreen / about 9 years ago / 1

    Is there a 12 bit pwm driver that's not a current sink?

  • Member #562416 / about 10 years ago / 1

    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!

  • Member #548339 / about 10 years ago / 1

    I got 2 of these free from Texas Instruments samples, just found how good of a deal I got on them

  • JustinRSharp / about 11 years ago / 1

    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?

    Thanks in advance, A fellow geek

  • Rengers / about 13 years ago / 1

    I'm trying to comprehend the datasheeet, but there's on thing I can't figure out:
    Does this IC have have a total max output current of 120mA, or is it 120mA per channel?

    • dreamlayers / about 13 years ago / 2

      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.

  • benuk / about 13 years ago / 1

    You should check this out http://micromegacorp.com/umpwm1.html
    8PWM in, 8PWM out!

  • ddd999 / about 14 years ago / 1

    RichardInVA: 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.
    The protocol is fully documented in the datasheet.

  • RichardInVA / about 14 years ago / 1

    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.

    • AaronW / about 13 years ago / 1

      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.

  • Mr.Sharumpe / about 14 years ago / 1

    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!

    • Ryan6 / about 14 years ago / 1

      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.

      • EmilioG / about 13 years ago / 2

        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.

  • JoshFranz / about 14 years ago / 1

    Awesome! Next step: Get the SMD version!
    ...please?

  • ao / about 14 years ago / 1

    Great to see you carrying this sometimes-hard-to-get chip!

    • BB / about 14 years ago / 1

      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.

      • Ryan6 / about 14 years ago / 1

        Agree with that. Free or $2 cheaper... But hey, people love to throw money away.

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

  • 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 http://wp.me/pQmjR-Ey

    • SomeGuy123 / about 13 years ago / 1

      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.

      • dreamlayers / about 13 years ago / 1

        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.

Customer Reviews

4.5 out of 5

Based on 2 ratings:

Currently viewing all customer reviews.

Excellent provider of quality electronics

They shipped it out super fast and it arrived in only two business days. Also, they provided the best price I could find online from any source shipping it from inside the US!

Alright Chip

It works as its supposed to but it's 4/5 because the pins are rather weak and if you're not careful they can break off easily.