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.

LP5569: Independent mapping for simple breathing effect

Part Number: LP5569

Hi all,

I am still struggling to extend a simple LED breathing effect to different mapping options. Our application has the following LED outputs

LED1 - Connected to a white LED_A

LED2 - Connected to a white LED_B

LED3 - Connected to a white LED_C

LED4 - Connected to an RGB LED_D (R)

LED5 - Connected to an RGB LED_D (G)

LED6 - Connected to an RGB LED_D (B)

LED7 - Connected to an RGB LED_E (R)

LED8 - Connected to an RGB LED_E (G)

LED9 - Connected to an RGB LED_E (B)

I want to use a very simple engine that creates an infinite breathing effect and associate it with the different 5 LEDs flashing white, one at a time. Please note that LED_A, LED_B and LED_C will activate one line and LED_D and LED_E will activate 3 lines each. I will then need 5 different LED mappings associated to engine 1. Can the mapping be changed dynamically?

The program is something along the following lines:

.segment program1

map_addr led_a (it works if I define a dw instruction with one LED combination)

set_pwm 0

loop1:

ramp 1, 100

ramp 1, -100

wait 0.3

branch 0,

loop1 end

My question is, how can I define the mapping of the 5 different combinations I want to generate independently?

Thanks for your help

  • Hi, David,

    Here I attach the example code for your reference.

    LP5569_Example.zip

    I test the code and it can realize your pattern.

    Please help to click "Resolve" if the problem is solved.

    Thanks.

    Regards,

    Kenneth

  • Thanks for your code Kenneth, I have loaded the code on our system and it does what I thought it would do looking at the code.

    Unfortunately, this is not what our project requires. I need to be able to enable independently one breathing effect on one LED, leaving the other ones off, and we need to activate them with different i2c commands controlled by the micro.

    The code that you sent me generates a sequence of flashes in a timely manner, but I need independent control (on/off) of one LED at a time.

    Every LED represents an audio input in our system, and only one would be enable at a time. With the remote control, the user will select one input (independent selection cases) and the LED of the input would breathe, in the following way:

    Input 1 -> Breathing effect on LED_A (all other LEDs off)
    Input 2 -> Breathing effect on LED_B (all other LEDs off)
    Input 3 -> Breathing effect on LED_C (all other LEDs off)
    Input 4 -> Breathing effect on LED_D (all other LEDs off)
    Input 5 -> Breathing effect on LED_E (all other LEDs off)

    I could achieve what I need if:

    - The chip had several more engines, which unfortunately is not the case.
    - The mapping of the engine could be changed via i2c files, but the registers seem Read only.
    - Using the variables ra,rb,rc,rd as information containers for the mapping. But it seems variables cannot be used as parameters for the LED mapping programming functions.

    Is it what I am trying to do beyond the capabilities of this chip?

    Regards,

    David
  • Hi, David,

    I'm clear about what you want to do now.

    Let me double check it and reply you next Monday.

    Thanks.
    Regards,
    Kenneth
  • Many thanks Kenneth.

    Regards,

    David

  • Hi, David,

    You don't need to modify the map address and realize it as the following code:

    2376.LP5569_Example.zip

    By changing the ENGINE1_PROG_START value through I2C after stopping engine can change to another map address:

    In above figure, 07h represents map_addr row1 and 0Bh for row2.

    You may also try ra rb and je for this purpose.

    Thanks.

    Kenneth

  • Thanks Kenneth,

    I will have a look into it as soon as I have some time. Certainly this week.

    Best,

    David

  • David,

    OK. Let us know.

    Kenneth
  • Hi Kenneth,

    I am clearly missing something here. I have tried to increment the number of loops to have 5 different entry points to control the 5 leds with the same effect.

    The two first entry points work fine, but the rest do flash erratically

    This is the code I am using LP5569_Example_5_LEDs.src.zip, and the entry memory locations I think should be correct :

    LED1: 0x07h

    LED2: 0x0Bh

    LED3: 0x0Fh

    LED4: 0x13h

    LED5: 0x17h

    When you say stop the engine, this is what I am doing:

    1. Stop engines sending Engine_Control1 (Reg. 01h) and Engine_Control2 (Reg. 02h) to Hold and Stop engines.

    2. Change the entry point for Engine1 (Reg. 48h)

    3. Re-enable the Free Run and Run engines via Engine_Control1 (Reg. 01h) and Engine_Control2 (Reg. 02h).

    Am i missing something obvious?

    Thanks,

    David