This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to synchronize 48 x LEDs using 3 x tlc59116 16x LEDS per driver

Other Parts Discussed in Thread: TLC59116

We are using 3 x LED drivers, tlc59116. We are using I2C control.

We have 48 LEDS in total, 16 per driver.

We want to turn on the LEDs all together and have them blink on and off all at the same time.

Currently each block of 16x LEDs are starting and stopping at different times so they are all out of sync.  We can sync each LED from a single Driver but not between Drivers.

Lets say;

Driver 1 controls Block1 of 16 LEDs

Driver 2 controls Block2 of 16 LEDs

Driver 3 controls Block3 of 16 LEDs

So all the LEDs in Block one come on together, but they are not synchronized the same time, ie. Block1 to Block2, Block3.

We put a 5 second interval between blinks but each driver seems to have their own random start times.

We are using the same I2C address 0x68 for the 3 drivers.

I am not sure if this can be fixed or what it is related to?

  • Hi Lee,

    It's always good practice to give each device it's own address. Then you can use the ALLCALL address to turn the LEDs on.

    In addition to that, Mode Register 2 (MODE2) has an option to have LED change on the I2C stop command. That means you can address the individual devices, and they will change after the last device is addressed. This is enabled by default.
  • We are currently using ALLCALL address. We can turn on and off the LEDs all together, but when they start to blink function (say 500ms interval), they become out of sync. It seems each block of 16 LEDs seem to have their own start and stop time.
  • Harry, Here is the code we are using for Mode2.

    // Set GRPPWM: Duty cycle
    Write_Reg_TLC59116(ALLCALL_ADDRESS, TLC59116_GRPPWM, 0x80);
    // Set GRPFREQ: Not blinking, must be 0
    Write_Reg_TLC59116(ALLCALL_ADDRESS, 19, (blink_second*23));
    // Set LEDs ON for now
    for (i=20; i< 24; i++) {
    Write_Reg_TLC59116(ALLCALL_ADDRESS, i, 0xFF);
    }
    // Set MODE2: dimming
    Write_Reg_TLC59116(ALLCALL_ADDRESS, 1, 0x20);
  • Hi Lee,

    Any chance you figured this out? Having the same problem that I think you were having, using the same ALLCALL method. However, I'm noticing that my LEDS start in sync, then go out of sync, then come back in sync, etc.. Meaning, they don't all have the same blink period somehow. Although, from my code, I'm using the ALLCALL address for all my programming, including starting the oscillator, so the settings and I2C stop command should be all completely synchronized. It's almost as if the oscillators are not the same, so the clock divisors give different values.

    I know this is kind of an old post, but anything you might've figured out would be helpful, thanks in advance!
  • Hi Colin,

    After looking into this further, the oscillators of the devices are not in sync, so that will cause the response you are seeing. We've been encouraging designers to use the SW restart command periodically in order to keep the LEDs in sync. Based off the I2C frequency, you can actually reset the device and the key registers without any visual impact.
  • Hi Harry,

    Thanks for the response. While working out this issue, I have a real simple test program that begins with a software reset. As the software reset is a global address I would assume all devices on the bus would be reset simultaneously, however, I see the same result pop up after just two or three blinks (at ~1Hz rate). I can't really imagine resetting the device in between blinks, kind of defeats the purpose of the blink. I've had to resort to just blinking using my own timer and turning on/off the leds using the output registers.

    As for the oscillator being out of sync, I can certainly see that begin possible, however at 25Mhz, even hundreds of cycles of difference shouldn't be noticeable if they were at the same frequency. From what I'm seeing, they start in sync, then go out of sync, then come back, and so on. That to me shows that the two blink frequencies are actually slightly different from each other. The only explanation I can think of for this is that the oscillators have too much variation in their exact frequency from part to part. Obviously being exactly 25Mhz isn't important for one chip, but if one is at 24Mhz and another is at 26Mhz, then you would see the effect that I am seeing.

  • Colin,

    Yes, you are correct. The oscillator can vary slightly from device to device. That's what's causing them to go out of sync.

    The workaround we've used is to reset the device to put the oscillators back in phase.