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.

Compiler/LP5024: LP5024 LED Control

Part Number: LP5024

 

Tool/software: TI C/C++ Compiler

It is developing products using LP5024.
I'm making a driver by looking at the example file here, and I have a question and leave a message.
I'm looking for a way to turn off all or some LEDs after using the RGB LED. Can I use the LED_Global_Off located on DEVICE_CONFIG1 Register?

And how do you set it up when you want to express different colors out of 7 LEDs?

ex)

 LP5024_Mode_Select_Normal();
 LP5024_Device_Config1(0x3C);
 LP5024_LED_CONFIG0(0x01);  
 LP5024_Bank_Brightness_Set(255);
 LP5024_Bank_Color_Set(0,255,0);

 LP5024_LED_CONFIG0(0x02);  
 LP5024_Bank_Brightness_Set(255);
 LP5024_Bank_Color_Set(255,0,0);

 LP5024_LED_CONFIG0(0x04);  
 LP5024_Bank_Brightness_Set(255);
 LP5024_Bank_Color_Set(0,0,255);

..............


If there is an effective control method, I hope you can show sample reservation.

I wish you a happy day again.

  • LED_Global Off can be used to shutdown all of the LEDs. If you just want to shutdown some, you can write 0x00 for the color registers.

    You can use the color register for each RGB LED to get a certain color.

    But don't use BANK function, since BANK function set them together.

    You can refer to the foolowing code in the sample code:

    void LED_Color_Set(char LED_Number, char GS_Red, char GS_Green, char GS_Blue)
    {
    MAP_I2C_setSlaveAddress(EUSCI_B1_BASE, SLAVE_ADDRESS1);
    MAP_I2C_masterSendMultiByteStart(EUSCI_B1_BASE, LED_Number*3+0x0F); //send register address
    MAP_I2C_masterSendMultiByteFinish(EUSCI_B1_BASE,GS_Red); // send register data
    MAP_I2C_masterSendMultiByteStart(EUSCI_B1_BASE, LED_Number*3+0x10); //send register address
    MAP_I2C_masterSendMultiByteFinish(EUSCI_B1_BASE,GS_Green); // send register data
    MAP_I2C_masterSendMultiByteStart(EUSCI_B1_BASE, LED_Number*3+0x11); //send register address
    MAP_I2C_masterSendMultiByteFinish(EUSCI_B1_BASE,GS_Blue); // send register data
    }