[FAQ] LP5813: Quick program steps guide for LP5813, LP5811

Part Number: LP5813
Other Parts Discussed in Thread: LP5811,

Tool/software:

How to program LP5813, LP5811 in direct drive mode or TCM drive mode with auto or manual control?

    • LP5813, LP5811 in direct drive mode with manual control
      1. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set boost output to 5V and maximum output current to 25.5mA : Set boost_vout = 14h and max_current = 0h (Write 26h to register<0x001>)
      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>

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

    • LP5813, LP5811 in direct drive mode with auto control
      1. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set boost output to 5V and maximum output current to 25.5mA : Set boost_vout = 14h and max_current = 0h (Write 26h to register<0x001>)
      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>)

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

    • LP5813 in TCM drive mode, 4 scan with manual control
      1. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set boost output to 5V and maximum output current to 25.5mA : Set boost_vout = 14h and max_current = 0h (Write 26h to register<0x001>)
      3. Set LED drive mode as direct drive 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>

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

    • LP5813 in TCM drive mode, 4 scan with auto control
      1. Enable the device : Set chip_en = 1h (Write 01h to register<0x000>)
      2. Set boost output to 5V and maximum output current to 25.5mA : Set boost_vout = 14h and max_current = 0h (Write 26h to register<0x001>)
      3. Set LED drive mode as direct drive 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>)

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