• Home
  • Store
  • Projects
  • Assorted
  • Services
  • Contact
or show support
by clicking an Ad
Color Theme:
Dark or Light

Microchip PIC C18 TLC5940 Library

A library written in C18 for the 18F line of PICs from Microchip, to control multiple TLC5940 LED drivers. Based from a HiTech C library from a project posted on Waiting for Friday(Project Link).

Timer 0 is used to BLANK the drivers and Timer 2 is used in conjunction with CCP1 to produce the clock signal. Included files run on the 18F2550, but it could easily be ported to different chip. Runs quite efficiently and is currently setup for RGB LEDs. The R-G-B arrays are set as unsigned char, but the TLC5940 expects 12-bit numbers for its color data, to keep large amounts of LEDs from taking up way to much data memory, the 8-bit numbers are expanded to 12-bit with the 4 LSB all 0s, so no LED is ever fully on, but its not noticable.

Written to run on a 48 Channel Mono / 16 Channel RGB LED Controller which utilizes a 18F2550 and 3x TLC5940s, but the code can be easily edited to work with different PICs and hardware platforms. To demonstrate it also includes a basic RGB LED control firmware, to fade or flash the LEDs, a few patterns have been programmed, but more could be added.


TLC5940 C18 Library v.2 Download



TLC5940 iRef Resistor Calculator

LED Configuration:
Single: Series: Parallel:
LEDs in Series/Parallel:   
Desired Current per LED: mA
iRef Resistor Value: ohms
Estimated Voltage: volts

TLC5940 Dissipation Calculator:

This will be added in the future. Here is an article with some good info for the time being.

This Link

code.google.com/p/tlc5940arduino/
wiki/PowerDissipation

If any errors are found with the calculator please Contact Us

Copyright Chromation Systemsİ Website name all rights reserved. | Built from a "Free Website Templates"
Chromation Systems, or its Owner, is not liable for any loss, damage or expenses of any kind resulting
from the use or misuse of this site or its contents.
Full Disclaimer     Sitemap
Best viewed in FireFox 2+ , IE6+, or Chrome in at least 1024x768