Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

[FAQ] LP5812: Quick program steps guide for LP5812, LP5810

Part Number: LP5812
Other Parts Discussed in Thread: LP5810,

Tool/software:

How to program LP5812, LP5810 in direct drive mode or TCM drive mode with auto or manual control?

    • LP5812, LP5810 in direct drive mode with manual control
      1. Manually Execute I2C Slave Addressing
        1. Broadcast Write Data 0x01 to Register 0x000 (Write 01h to register<0x000>)
        2. Broadcast Write Data 0x05 to Register 0x350 (Write 05h to register<0x350>)
        3. Broadcast Write Data 0x08 to Register 0x350 (Write 08h to register<0x350>)
        4. Broadcast Write Data 0x01 to Register 0x350 (Write 01h to register<0x350>)
        5. Broadcast Write Data 0x03 to Register 0x350 (Write 03h to register<0x350>)
        6. Broadcast Write Data 0x27 to Register 0x351 (Write 27h to register<0x351>)
        7. Broadcast Write Data 0x00 to Register 0x350 (Write 00h to register<0x350>)
        8. Broadcast Write Data 0x00 to Register 0x000 (Write 00h to register<0x000>)
      2. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      3. Set LED drive mode as direct drive mode : Set led_mode = 0h (Write 00h to register<0x002>)
      4. Send Update command to complete configuration setting above (Write 55h to register<0x010>)
      5. Enable all 4 LEDs : Set LED_en = 1h (Write 0Fh to register<0x020>)
      6. Set 12.75mA peak current for all LEDs in manual_mode : Set manual_dc = 7Fh (Write 7Fh to register<0x030~0x033>)
      7. Set 50% PWM duty cycle to light all 4 LEDs : Set manual_pwm = 7Fh (Write 7Fh to register<0x040~0x043>)

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    • LP5812, LP5810 in direct drive mode with auto control
      1. Manually Execute I2C Slave Addressing
        1. Broadcast Write Data 0x01 to Register 0x000 (Write 01h to register<0x000>)
        2. Broadcast Write Data 0x05 to Register 0x350 (Write 05h to register<0x350>)
        3. Broadcast Write Data 0x08 to Register 0x350 (Write 08h to register<0x350>)
        4. Broadcast Write Data 0x01 to Register 0x350 (Write 01h to register<0x350>)
        5. Broadcast Write Data 0x03 to Register 0x350 (Write 03h to register<0x350>)
        6. Broadcast Write Data 0x27 to Register 0x351 (Write 27h to register<0x351>)
        7. Broadcast Write Data 0x00 to Register 0x350 (Write 00h to register<0x350>)
        8. Broadcast Write Data 0x00 to Register 0x000 (Write 00h to register<0x000>)
      2. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      3. Set LED drive mode as direct drive mode : Set led_mode = 0h (Write 00h to register<0x002>)
      4. Enable the auto animation for all LEDs : Set auto_en = 1h (Write 0Fh to register<0x004>)
      5. Send Update command to complete configuration setting above (Write 55h to register<0x010>)
      6. Enable all 4 LEDs : Set LED_en = 1h (Write 0Fh to register<0x020>)
      7. Set 12.75mA peak current for all LEDs in auto_mode : Set auto_dc = 7Fh (Write 7Fh to register<0x050~0x053>)
      8. Set LED_0 Autonomous_Animation value
        1. Write 00h to register<0x080>
        2. Write 00h to register<0x081>
        3. Write 00h to register<0x082>
        4. Write FFh to register<0x083>
        5. Write 00h to register<0x084>
        6. Write FFh to register<0x085>
        7. Write 00h to register<0x086>
        8. Write AAh to register<0x087>
        9. Write AAh to register<0x088>
      9. Set the same value for LED_1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x09A~0x0A2>)
      10. Set the same value for LED_2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x0B4~0x0BC>)
      11. Set the same value for LED_3 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x0CE~0x0D6>)
      12. Send update command to complete configuration settings (Write 55h to register<0x010>)
      13. Send start command to start the engine animation (Write FFh to register<0x011>)

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    • LP5812 in TCM drive mode, 4 scan with manual control
      1. Manually Execute I2C Slave Addressing
        1. Broadcast Write Data 0x01 to Register 0x000 (Write 01h to register<0x000>)
        2. Broadcast Write Data 0x05 to Register 0x350 (Write 05h to register<0x350>)
        3. Broadcast Write Data 0x08 to Register 0x350 (Write 08h to register<0x350>)
        4. Broadcast Write Data 0x01 to Register 0x350 (Write 01h to register<0x350>)
        5. Broadcast Write Data 0x03 to Register 0x350 (Write 03h to register<0x350>)
        6. Broadcast Write Data 0x27 to Register 0x351 (Write 27h to register<0x351>)
        7. Broadcast Write Data 0x00 to Register 0x350 (Write 00h to register<0x350>)
        8. Broadcast Write Data 0x00 to Register 0x000 (Write 00h to register<0x000>)
      2. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      3. Set LED drive mode as 4-scan mode : Set led_mode = 4h (Write 40h to register<0x002>)
      4. Send Update command to complete configuration setting above (Write 55h to register<0x010>)
      5. Read back config_err_status to check if the configuration is proper (Read register<0x300>)
      6. Enable all 12 LEDs : Set LED_en = 1h (Write F0h to register<0x020> & Write FFh to register<0x021>)
      7. Set 12.75mA peak current for all LEDs in manual_mode : Set manual_dc = 7Fh (Write 7Fh to register<0x034~0x03F>)
      8. Set 50% PWM duty cycle to light all 12 LEDs : Set manual_pwm = 7Fh (Write 7Fh to register<0x044~0x04F>)

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    • LP5812 in TCM drive mode, 4 scan with auto control
      1. Manually Execute I2C Slave Addressing
        1. Broadcast Write Data 0x01 to Register 0x000 (Write 01h to register<0x000>)
        2. Broadcast Write Data 0x05 to Register 0x350 (Write 05h to register<0x350>)
        3. Broadcast Write Data 0x08 to Register 0x350 (Write 08h to register<0x350>)
        4. Broadcast Write Data 0x01 to Register 0x350 (Write 01h to register<0x350>)
        5. Broadcast Write Data 0x03 to Register 0x350 (Write 03h to register<0x350>)
        6. Broadcast Write Data 0x27 to Register 0x351 (Write 27h to register<0x351>)
        7. Broadcast Write Data 0x00 to Register 0x350 (Write 00h to register<0x350>)
        8. Broadcast Write Data 0x00 to Register 0x000 (Write 00h to register<0x000>)
      2. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      3. Set LED drive mode as 4-scan mode : Set led_mode = 4h (Write 40h to register<0x002>)
      4. Enable the auto animation for all LEDs : Set auto_en = 1h (Write F0h to register<0x004> & Write FFh to register<0x005>)
      5. Send Update command to complete configuration setting above (Write 55h to register<0x010>)
      6. Read back config_err_status to check if the configuration is proper (Read register<0x300>)
      7. Enable all 12 LEDs : Set LED_en = 1h (Write F0h to register<0x020> & Write FFh to register<0x021>)
      8. Set 12.75mA peak current for all LEDs in auto_mode : Set auto_dc = 7Fh (Write 7Fh to register<0x054~0x05F>)
      9. Set LED_A0 Autonomous_Animation value
        1. Write 00h to register<0x0E8>
        2. Write 00h to register<0x0E9>
        3. Write 00h to register<0x0EA>
        4. Write FFh to register<0x0EB>
        5. Write 00h to register<0x0EC>
        6. Write FFh to register<0x0ED>
        7. Write 00h to register<0x0EE>
        8. Write AAh to register<0x0EF>
        9. Write AAh to register<0x0F0>
      10. Set the same value for LED_A1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x102~0x10A>)
      11. Set the same value for LED_A2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x11C~0x124>)
      12. Set the same value for LED_B0 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x136~0x13E>)
      13. Set the same value for LED_B1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x150~0x158>)
      14. Set the same value for LED_B2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x16A~0x172>)
      15. Set the same value for LED_C0 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x184~0x18C>)
      16. Set the same value for LED_C1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x19E~0x1A6>)
      17. Set the same value for LED_C2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x1B8~0x1C0>)
      18. Set the same value for LED_D0 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x1D2~0x1DA>)
      19. Set the same value for LED_D1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x1EC~0x1F4>)
      20. Set the same value for LED_D2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x206~0x20E>)
      21. Send update command to complete configuration settings (Write 55h to register<0x010>)
      22. Send start command to start the engine animation (Write FFh to register<0x011>)

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    • MCU Sample code
      • Link:https://tidrive.ext.ti.com/u/tYvJSE0LyWWni8lb/2c442300-de11-47c9-a9bb-ce3e0836a7e3?l
      • Access code:3w3'4wBQ
    • Linux Sample code
      • Link:https://tidrive.ext.ti.com/u/0cbf4SlG383Dxt_y/453a4725-2252-446f-9650-db2f5b81f186?l
      • Access code:.4cvwT7h