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. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set LED drive mode as direct drive mode : Set led_mode = 0h (Write 00h to register<0x002>)
      3. Send Update command to complete configuration setting above (Write 55h to register<0x010>)
      4. Enable all 4 LEDs : Set LED_en = 1h (Write 0Fh to register<0x020>)
      5. Set 12.75mA peak current for all LEDs in manual_mode : Set manual_dc = 7Fh (Write 7Fh to register<0x030~0x033>)
      6. 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. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set LED drive mode as direct drive mode : Set led_mode = 0h (Write 00h to register<0x002>)
      3. Enable the auto animation for all LEDs : Set auto_en = 1h (Write 0Fh to register<0x004>)
      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 auto_mode : Set auto_dc = 7Fh (Write 7Fh to register<0x050~0x053>)
      7. 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>
      8. Set the same value for LED_1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x09A~0x0A2>)
      9. Set the same value for LED_2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x0B4~0x0BC>)
      10. Set the same value for LED_3 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x0CE~0x0D6>)
      11. Send update command to complete configuration settings (Write 55h to register<0x010>)
      12. Send start command to start the engine animation (Write FFh to register<0x011>)

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

    • LP5812 in TCM drive mode, 4 scan with manual control
      1. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set LED drive mode as direct drive mode : Set led_mode = 4h (Write 40h to register<0x002>)
      3. Send Update command to complete configuration setting above (Write 55h to register<0x010>)
      4. Read back config_err_status to check if the configuration is proper (Read register<0x300>)
      5. Enable all 12 LEDs : Set LED_en = 1h (Write F0h to register<0x020> & Write FFh to register<0x021>)
      6. Set 12.75mA peak current for all LEDs in manual_mode : Set manual_dc = 7Fh (Write 7Fh to register<0x034~0x03F>)
      7. 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. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set LED drive mode as direct drive mode : Set led_mode = 4h (Write 40h to register<0x002>)
      3. Enable the auto animation for all LEDs : Set auto_en = 1h (Write F0h to register<0x004> & Write FFh to register<0x005>)
      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 auto_mode : Set auto_dc = 7Fh (Write 7Fh to register<0x054~0x05F>)
      8. 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>
      9. Set the same value for LED_A1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x102~0x10A>)
      10. Set the same value for LED_A2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x11C~0x124>)
      11. Set the same value for LED_B0 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x136~0x13E>)
      12. Set the same value for LED_B1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x150~0x158>)
      13. Set the same value for LED_B2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x16A~0x172>)
      14. Set the same value for LED_C0 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x184~0x18C>)
      15. Set the same value for LED_C1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x19E~0x1A6>)
      16. Set the same value for LED_C2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x1B8~0x1C0>)
      17. Set the same value for LED_D0 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x1D2~0x1DA>)
      18. Set the same value for LED_D1 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x1EC~0x1F4>)
      19. Set the same value for LED_D2 Autonomous_Animation (Write 00h, 00h, 00h, FFh, 00h, FFh, 00h, AAh, AAh to register<0x206~0x20E>)
      20. Send update command to complete configuration settings (Write 55h to register<0x010>)
      21. Send start command to start the engine animation (Write FFh to register<0x011>)

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