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