Pages: [1]   Go Down
Author Topic: TLC59116F I2C LED driver  (Read 3342 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I got some TLC59116F LED drivers as samples ( and soldered them to SSOP adapters.

These are pretty cool because each module can drive 16 LEDs or 5 RGB LEDs with brightness control and you can drive up to 14 modules with just the two i2c pins.

I had some problems with getting this to work, because the outputs are disabled by default when it's powered on. So here's a little sketch for other who want to use the modules.

Without any pullups/pulldowns on the address pins a module has the address 96 - with the adress 104 you can talk to all modules at once, independent of their individual address. The outputs are open drains so you have to connect the kathodes of the leds to the driver.

#include <Wire.h>

char allModuleAddress = 104;
char module1Address = 96;

void setup()

void loop()
  setLedBrightness(module1Address, 0, 5);

// Initialise all outputs for pwm and global dimming, switch off sleep mode
void initModule(char address)
  for (char i=0; i<17; i++) {
  for (char i=0; i<6; i++) {

// Set the global brightness to dim all lit leds
void setGlobalBrightness(char address, char brightness) {

// Set the brightness of one output
void setLedBrightness(char address, char lednum, char brightness) {
  Wire.send(0x02 + lednum);

// Set the brightness for 3 outputs at once (for rgb leds)
void setGroupBrightness(char address, char groupNum, char brightness_r, char brightness_g, char brightness_b) {
  Wire.send(0xA2 + (3*groupNum));
« Last Edit: January 18, 2011, 05:22:42 am by pannen » Logged

Pages: [1]   Go Up
Jump to: