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.

LP55231 evaluation kit

Other Parts Discussed in Thread: LP55231, LP8501, LP5523

I designed several custom boards with one or more LP55231s and various leds (white, rgb, etc). They all work when driven by I2C commands from a microcontroller but I want to program them and have them work standalone powered by a coin cell battery. I followed the instructions for the evaluation board and tried to use the LP55231 evaluation kit software and PSPad, etc. However, the software won't recognize my controller nor can I get any I2C ACK from the on-board LP552321 through the software. I tried setting the controller port to 2 and 7 but still no luck. How can I program my devices? Any ideas? Thanks.

  • Hi Kris,

    Do you mean that our GUI won't recognize the another controller you have used? The GUI has been designed for our own EVM and the on-board uC has dedicated FW that works with the GUI. GUI hasn't been designed to work with any other controller than the one in our EVM.

    You can use the evaluation kit for figuring out the I2C commands needed for the programming. You can see the commands in the history tab. For controlling the uC you have used, you will need your own FW/SW.

    Thanks.

    Best Regards,

    Tomi Koskela

  • Thanks for the quick reply Tomi, I expected this would be the case. I started trying to program the LP55231 in my Arduino-like sketch using the evaluation kit example as you suggested.  I think I got it to work once since led3 was blinking, but most of the times I ran the program I would bet an Engine 1 busy flag and i don't think the program was properly written to RAM. So I have a few questions about this process:

    1) Do I have to turn on all Engines even if they are "programmed" with 0x00 in order to get reliable performance from the LP55231?

    2)  Once the Engines are programmed, can the programs run autonomously? That is, if I load programs into the three engines, turn off the power, then will the programs run when power is applied again? This is what I want.

    3) I am not quite sure how to use the program paging; there are 16 (0x50 - 0x6F) 2-byte instructions in six pages, if I have a program that is more than 16 instructions long, how should I load it into the Engine memory?

    Here is the relevant portion of my code for Engine 1: Is there something obvious I am doing wrong such that the engines remain in their busy mode?

     

     //Program Engine 1
     // writeByte(LP55231_Address, ENABLE_ENGINE_CNTRL1, 0x40); // chip enable  | Engine 1 hold mode
      writeByte(LP55231_Address, ENGINE_CNTRL2, 0x00); // Disable all Engines
      writeByte(LP55231_Address, ENGINE1PC, 0x00);  // set PC for Engine 1 to 0x00
      writeByte(LP55231_Address, ENG1_MAPPING_MSB, 0x01);
      writeByte(LP55231_Address, ENG1_MAPPING_LSB, 0xFF); // Map all leds to Engine 1
      delay(100);
      writeByte(LP55231_Address, ENGINE_CNTRL2, 0x10); // load program mode for Engine 1, reset Engine 1 PC
    
      uint8_t pattern[14] = {0x9D, 0x03, 0x40, 0xFF, 0x5E, 0x00, 0x40, 0x00, 0x5E, 0x00, 0xA0, 0x01, 0xC0, 0x00};
    
      int status = readByte(LP55231_Address, STATUS_INTERRUPT);
      while(status && 0x60) {
        Serial.println("Engine 1 busy"); 
        delay(100);  // wait for Engine 1 to clear before programming
      }
      writeBytes(LP55231_Address, PROG_MEM_START, 14, &pattern[0]);
    
      writeByte(LP55231_Address, ENABLE_ENGINE_CNTRL1, 0x60); // chip enable  | run engine 1 free mode
      writeByte(LP55231_Address, ENGINE_CNTRL2, 0x20); // run program mode for Engine 1, reset Engine 1 PC

    Thanks for any help you can provide.

  • Alright, even though I get a persistant start up bust and engine 1 busy flag from the status register, I am able to blink any one of the leds using Engine 1. I am a bit confused about the mux_map_start et al functions. Exactly where does the map table go? Here is the code that blinks the led in case anyone else is confused about this:

    writeByte(LP55231_Address, ENGINE_CNTRL2, 0x00); // Disable all Engines
    //Program Engine 1
    writeByte(LP55231_Address, ENGINE1PC, 0x00); // set PC for Engine 1 to 0x00
    writeByte(LP55231_Address, ENG1_MAPPING_MSB, 0x01);
    writeByte(LP55231_Address, ENG1_MAPPING_LSB, 0xFF); // Map all leds to Engine 1
    delay(100);
    writeByte(LP55231_Address, ENGINE_CNTRL2, 0x10); // load program mode for Engine 1, reset Engine 1 PC

    uint8_t pattern[14] = {0x9D, 0x06, 0x40, 0xFF, 0x5E, 0x00, 0x40, 0x00, 0x5E, 0x00, 0xA0, 0x01, 0xC0, 0x00};
    // uint8_t pattern[16] = {0x9C, 0x0E, 0x40, 0xFF, 0x5E, 0x00, 0x40, 0x00, 0x5E, 0x00, 0xA0, 0x01, 0xC0, 0x00, 0x00, 0xFF};

    writeBytes(LP55231_Address, PROG_MEM_START, 14, &pattern[0]);

    writeByte(LP55231_Address, ENABLE_ENGINE_CNTRL1, 0x60); // chip enable | run engine 1 free mode

    // Run all Engines
    writeByte(LP55231_Address, ENGINE_CNTRL2, 0x20); // run program mode for Engine 1, reset Engine 1 PC
  • OK, sorry for the spam-like posts, but i was able to also use the mux map table to get several leds to blink and ramp, etc. This is essentially example 1 in the eval kit documentation. I tried to get example 2 to work but it seems as though the mux_table_next command is being ignored. Any help of this would be appreciated Here is the code I am using:

     writeByte(LP55231_Address, ENGINE_CNTRL2, 0x00); // Disable all Engines
      //Program Engine 1
      writeByte(LP55231_Address, ENGINE1PC, 0x00);  // set PC for Engine 1 to 0x15
      writeByte(LP55231_Address, ENG1_MAPPING_MSB, 0x01);
      writeByte(LP55231_Address, ENG1_MAPPING_LSB, 0xFF); // Map all leds to Engine 1
      delay(100);
      writeByte(LP55231_Address, ENGINE_CNTRL2, 0x10); // load program mode for Engine 1, reset Engine 1 PC
    
    // uint8_t pattern[14] = {0x9D, 0x06, 0x40, 0xFF, 0x5E, 0x00, 0x40, 0x00, 0x5E, 0x00, 0xA0, 0x01, 0xC0, 0x00}; // blink
    //  uint8_t pattern[14] = {0x9D, 0x06, 0x0A, 0xFF, 0x5E, 0x00, 0x15, 0xFF, 0x5E, 0x00, 0xA0, 0x01, 0xC0, 0x00}; // fade in/out
    //Example 1
    uint8_t pattern[16] = {0x01, 0xC7, 0x9C, 0x00, 0x0A, 0xFF, 0x15, 0xFF, 0x5E, 0x00, 0x9D, 0x80, 0xA0, 0x01, 0xC0, 0x00}; // using mux map table
    //Examples 2
    //  mux map table         row 1        row2         row3         row4         row5         row6         row7        row8         row9       row10
    //uint8_t pattern[36] = {0x00, 0x02,  0x00, 0x01,  0x00, 0x40,  0x00, 0x04,  0x00, 0x08,  0x00, 0x80,  0x00, 0x10, 0x00, 0x20, 0x01, 0x00, 0x01, 0xFF,
    //0x9C, 0x00, 0x9C, 0x88, 0x0A, 0xFF, 0x15, 0xFF, 0x5E, 0x00, 0x9D, 0x80, 0xA4, 0x01, 0xC0, 0x00};                       
    
      writeBytes(LP55231_Address, PROG_MEM_START, 16, &pattern[0]);
    
      writeByte(LP55231_Address, ENABLE_ENGINE_CNTRL1, 0x60); // chip enable  | run engine 1 free mode
    
      // Run all Engines
      writeByte(LP55231_Address, ENGINE_CNTRL2, 0x20); // run program mode for Engine 1, reset Engine 1 PC

    The mux_table_next command 0x9D80 doesn't seem to advance to the next row and I just a repeat of row 1 indefinitely.

    I also think it is not possible to have the engines function without being connected to a microcontroller.
    Please tell me if I am wrong but this is somewhat disappointing sine i thought I might have an inexpensive and portable way to get
    sophisticated lighting effects in a small package.

  • Hi Kris,

     

    To help with the LED engine mapping etc. please take a look at the LP8501 programming considerations application note: http://www.ti.com/lit/pdf/snva715

    LP8501 is very similar to LP5523 and the engine mapping etc. command set is compatible between both devices. LP5523 has some additional commands, using variables etc. but the LP8501 programming application note should help you with the basic programming of LP5523 anyway.

     

    Thanks.

    Best Regards,

    Tomi Koskela

  • Hi Tomi,

    Thanks for the great suggestion. I was able to follow this extremely well written and clear application note and I can now program the LP55231. I suggest this AN be linked at the LP55231 page for others. Also, I still don't know one hing:

    Is it possible to have the program run without a microcontroller connected? This would be very useful!

    Here is the code for a multiple leds using the mux table:

    //Example 2
    //  mux map table         row 1        row2         row3         row4         row5         row6         row7        row8         row9       row10
    uint8_t pattern[44] = {0x00, 0x02,  0x00, 0x01,  0x00, 0x40,  0x00, 0x04,  0x00, 0x08,  0x00, 0x80,  0x00, 0x10, 0x00, 0x20, 0x01, 0x00, 0x01, 0xFF,
    0x9C, 0x00, 0x9C, 0x88, // define start (0x00) and end (0x08) of 9 led map given above
    0x9F, 0x80, // load row 1
    0x0A, 0xFF, 0x15, 0xFF, 0x5E, 0x00, // ramp up, ramp down, then wait
    0x9F, 0x81, // load row 2
    0x0A, 0xFF, 0x15, 0xFF, 0x5E, 0x00, // ramp up, ramp down, then wait
    0xA0, 0x02, 0xC0, 0x00};    // loop endlessly, end program                   
    
      writeByte(LP55231_Address, PROG_MEM_PAGE_SEL, 0x00); // for each sixteen 2-byte instructions, select a new page, up to 6
      writeBytes(LP55231_Address, PROG_MEM_START, 32, &pattern[0]);
      writeByte(LP55231_Address, PROG_MEM_PAGE_SEL, 0x01); // for each sixteen 2-byte instructions, select a new page, up to 6
      writeBytes(LP55231_Address, PROG_MEM_START, 12, &pattern[32]);
    
      writeByte(LP55231_Address, ENABLE_ENGINE_CNTRL1, 0x60); // chip enable  | run engine 1 free mode
    
      // Run all Engines
      writeByte(LP55231_Address, ENGINE_CNTRL2, 0x20); // run program mode for Engine 1, reset Engine 1 PC

    Thanks again for great support!

  • Hi Kris,

     

    As long as the VDD high the sequence written to the program memory stays there. But the memory is SRAM, so when the device is powered down (VDD low) the memory will be reset. So at each power-up you have to rewrite the registers and program memory to be able to run the sequence. After that the device runs autonomously the sequences as long as it is powered up.

     

    Hope this helps.

     

    Thanks.

    Best Regards,

    Tomi Koskela

  • Hi,
    How about four devices of LP55231 connected ? INT signal and TRIG signal ?