Hi.
It seems that it can be very complicated to turn an LED on with this driver.
uint8_t LED_caubInitTLC59116[] = { LUI_I2C_LED_REG_AUTO_INCREMMENT | LUI_I2C_LED_REG_MODE1, // MODE1, MODE2, PWM0,1,2,3,4,5,6,7 = off 0x01, 0x80, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, // PWM8,9,10,11,12,13,14,15 = off 0x90, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0x00, // GRPPWM, GRPFREQ, LEDOUT0, LEDOUT1, LEDOUT2, LEDOUT3 0x00, 0x00, 0xAA, 0xAA, 0xAA, 0xAA, // SUBADR1 ... SUBADR3, ALLCALLADR 0xD2, 0xD4, 0xD8, 0xD0, // Iref value (Low current CM = 0, HC = 0, Rext = 710 - CC - 23),Iout = ~3mA max) 0x17, }; void initLED(void) { uint8_t buf[32]; HAL_StatusTypeDef ret; buf[0] = LUI_I2C_LED_REG_MODE1; buf[1] = 0x00; // Turn chip on while((ret = HAL_I2C_Master_Transmit(LUI_I2C_LED_CHANNEL, LUI_I2C_LED_ADDRESS, buf, 2, 1000)) == HAL_BUSY); if(ret != HAL_OK) return;
osDelay(10);
while((ret = HAL_I2C_Master_Transmit(LUI_I2C_LED_CHANNEL, LUI_I2C_LED_ADDRESS, LED_caubInitTLC59116, sizeof(LED_caubInitTLC59116), 1000)) == HAL_BUSY); if(ret != HAL_OK) return; osDelay(10); buf[0] = LUI_I2C_LED_REG_MODE2; buf[1] = 0x00; // clear while((ret = HAL_I2C_Master_Transmit(LUI_I2C_LED_CHANNEL, LUI_I2C_LED_ADDRESS, buf, 2, 1000)) == HAL_BUSY); if(ret != HAL_OK) return; }
I have read back all registers and all contains the expected values. REXT is not mounted. Different values for IREF is tried, even 0xFF. Turning all LED's on by writing 0x55 to the 4 LED registered does not turn anything on. The error registers stays at 0x00 at all time. This example was expected to Turn all LED's on at different intensity. But the only current through the LES is the current in the voltmeter.