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.

TCA6507: Unable to change the LED once initialized in Arduino Development Board

Part Number: TCA6507

Hello,

I am using the TCA6507 LED Driver in one of my designs. I connected an RGB LED to the driver IC and I am initializing the registers in the beginning to turn the Green LED ON (connected to P1).

The registers values I am sending are:

byte autoIncrementMode = 0x10;

selection0 = 0x00; //Turn GreenLED ON with BANK 0
selection1 = 0x02;
selection2 = 0x02;
fadeOn = 0x08; //Bank1 : 0 msec; Bank0: 1024 msec
fullyOn = 0x60; //Bank1 : 512 msec; Bank0: 0 msec
fadeOff = 0x08; //Bank1 : 0 msec; Bank0: 1024 msec
firstFullyOff = 0x6A; //Bank1 : 512 msec; Bank0: 2048 msec
secondFullyOff = 0xCA; //Bank1 : 4096 msec; Bank0: 2048 msec
maxIntensity = 0xF2; //Bank1 : 100% ; Bank0: 12.5%

byte initialization = 0x88;

and I am writing the values to the I2C bus using the commands:

Wire.beginTransmission(LedDriver_Address);
Wire.write(autoIncrementMode); //Sets the IC in Autoincrement Mode
Wire.write(selection0);
Wire.write(selection1);
Wire.write(selection2);
Wire.write(fadeOn);
Wire.write(fullyOn);
Wire.write(fadeOff);
Wire.write(firstFullyOff);
Wire.write(secondFullyOff);
Wire.write(maxIntensity);
Wire.write(masterIntensity);
Wire.write(initialization);
Wire.endTransmission(LedDriver_Address);

I am able to set the Green LED working with the BANK0 Properties.

Later I want to change the LED to RED which is connected to P0 by using the following commands

selection0 = 0x00; //Red LED
selection1 = 0x01;
selection2 = 0x01;

Wire.beginTransmission(LedDriver_Address);
Wire.write(0x10); //Sets the IC in Autoincrement Mode
Wire.write(selection0);
Wire.write(selection1);
Wire.write(selection2);

 Wire.endTransmission(LedDriver_Address);

But the IC Driver is turning OFF instead. Can I know what is wrong in my method of implementing and if there is a different method to get the same results.

p.s.

If I am sending the following code:

selection0 = 0x00; //Red LED
selection1 = 0x01;
selection2 = 0x01;

Wire.beginTransmission(LedDriver_Address);
Wire.write(0x10); //Sets the IC in Autoincrement Mode
Wire.write(selection0);
Wire.write(selection1);
Wire.write(selection2);

Wire.write(fadeOn);
Wire.write(fullyOn);
Wire.write(fadeOff);
Wire.write(firstFullyOff);
Wire.write(secondFullyOff);
Wire.write(maxIntensity);
Wire.write(masterIntensity);
Wire.write(initialization);
Wire.endTransmission(LedDriver_Address);

It still is turning OFF as soon as I write these commands

  • Hello Sunil,

    I need to know what hex values you are sending to the TCA6507.  I would also like to see scope shots of your SDA and SCL signals to confirm that you are sending it properly and that signal look good qualitatively. 

    -Francis Houde

  • Hey! The First time to initialize, I am sending the following HEX values to the registers:

    byte autoIncrementMode = 0x10;

    selection0 = 0x00; //Turn GreenLED ON with BANK 0
    selection1 = 0x02;
    selection2 = 0x02;
    fadeOn = 0x08; //Bank1 : 0 msec; Bank0: 1024 msec
    fullyOn = 0x60; //Bank1 : 512 msec; Bank0: 0 msec
    fadeOff = 0x08; //Bank1 : 0 msec; Bank0: 1024 msec
    firstFullyOff = 0x6A; //Bank1 : 512 msec; Bank0: 2048 msec
    secondFullyOff = 0xCA; //Bank1 : 4096 msec; Bank0: 2048 msec
    maxIntensity = 0xF2; //Bank1 : 100% ; Bank0: 12.5%

    byte initialization = 0x88;

    This is to blink the green LED at P1. It is working fine.

    Now I am just changing S0, S1, and S2 registers to

    selection0 = 0x00; //Red LED
    selection1 = 0x01;
    selection2 = 0x01;

    to blink the red LED at P0.

    and then am rewriting the registers as follows:

    Wire.beginTransmission(LedDriver_Address);
    Wire.write(autoIncrementMode); //Sets the IC in Autoincrement Mode
    Wire.write(selection0);
    Wire.write(selection1);
    Wire.write(selection2);
    Wire.write(fadeOn);
    Wire.write(fullyOn);
    Wire.write(fadeOff);
    Wire.write(firstFullyOff);
    Wire.write(secondFullyOff);
    Wire.write(maxIntensity);
    Wire.write(masterIntensity);
    Wire.write(initialization);
    Wire.endTransmission(LedDriver_Address);

    But it is not changing the LED Blink.
  • Hi Sunil,

    The values you are writing to the selection registers make sense, and they are clearly having some effect if the light is going out (so it probably isn't a communication issue with the part). Have you checked if there are any hardware issues that may be preventing the red LED from lighting? One simple test to run might be to swap the green and red LEDs and see if the green one is still lighting up or if the red one is able to light if it is installed on the "working" port.

    Max