Colour conversion and LCD configuration for LPC1788

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Colour conversion and LCD configuration for LPC1788

    Hi,

    I need help on configuring my LCD and colour conversion.

    Currently I am using 5:6:5 configuration and everything working fine. My configuration as below,

    Source Code

    1. #define COLOR_CONVERSION GUICC_M565

    Source Code

    1. #define PIXEL_WIDTH 2

    Source Code

    1. #define DISPLAY_DRIVER &GUIDRV_Lin_16_API

    Source Code

    1. #define BPP 6 // Bits per pixel b110 = 16 bpp 5:6:5 mode


    Now I need more pin for GPIO, so I have to give up some RGB pin. So I have decided to make it RRRGGBBB 323 configuration.
    But no matter how I change, it won't work for me. It won't show any display other than backlight, sometimes it will triggered hardfaultexception. Please advise me on this problem please, where else do I need to configure?

    Source Code

    1. #define COLOR_CONVERSION GUICC_M323

    Source Code

    1. #define PIXEL_WIDTH 2

    Source Code

    1. #define DISPLAY_DRIVER &GUIDRV_Lin_8_API

    Source Code

    1. #define BPP 3 // Bits per pixel b011 = 8 bpp



    Thanks for all the help.
  • Hello irvind,

    I am afraid this does not sound like a problem, which can be solved from emWin side. Please make sure that the display controller is initialized according to the way you would like to drive it. I would suggest contacting the board manufacturer for further support in this case.

    Best regards,
    Adrian
  • long time passsed but may be help somebody
    if BPP, Freq-Devision factor and anything else about the LCD is tuned correctly
    your problem is about the Pallette. the Pallette of Pixel Serializer is empty. do something like this at the end of GLCD init code :

    C Source Code

    1. /* init colour pallet */
    2. for (i = 0; i < ( sizeof(LPC_LCD->PAL) / sizeof(LPC_LCD->PAL[0]) ); i++)
    3. {
    4. LPC_LCD->PAL[i] = 0x...; /* non zero color values */
    5. }
    6. }



    see pixel serilizer in LPC1788 UM for more info about endianness of pixels

    S.B.Sohrabi, regards