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.

LP5521: LP5521 check ramp command progress

Part Number: LP5521

We would like to blink LED using ramp command as follows.

ramp 100, 127
wait 100
ramp 100, -127

However since I2C communication is not reliable, we would like to check

1. current PC
2. progress of ramp command between 0 and127.


We are told that to check R_PWM (02H), G_PWM (03H), and B_PWM (04H), but all seems to be 0 while program is running.

  • Hi,

    Could you help to share your code or whole process of register setting with me?

  • I just want to check whether the program is running or not. 

    In addition, it would be very helpful if we can read current ramp value from 0-255.
    Since ramp command takes 0-255 value, it should have some way to get 0-255 value.

    Since PC is unreadable while program is running, we need some way to know its progress.

    My config(before writing program) is as follows.

    00H 0100 0000
    01H 0001 0101
    02H 0000 0000
    03H 0000 0000
    04H 0000 0000
    05H 1100 1000
    06H 0000 1110
    07H 0000 0000
    08H 0101 1001

    After writing this, program will be written in 11H-6FH then op mode will be changed to run.

  • I also checked that I CAN read R_PWM (02H), G_PWM (03H), and B_PWM (04H) after I write these registers in direct control mode.

    While in run program mode, these registers kept to be all 0s, even LED is actually lit up.

    Again, I just want to know how much brightness the LEDs are, while program is running.

  • Could you reply as soon as possible?

    We are waiting for this answer over a week.

  • Please give us some update.

  • Hi,

    Sorry that it seems no way to check the PWM value while engine is running, by reading register value. While one command like ramp is running, it change the PWM pattern generator directly but not through R/B/G_PWM register, so you cannot get the value by read them. And there is no read commands designed for engine function. I think it need to measure the output current by multimeter, to calculator where the program have got.