emWin can not read from SSD1963?

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

  • emWin can not read from SSD1963?

    Hi,
    I am using the NXP emWin (5.38a) library running on an LPC1768 to drive a 800 x 480 pixel LCD panel using a Solomon SSD1963 controller. I have configured emWin to use the FlexColor driver with 16 bpp (565 format), no cache, and a 16 bit parallel bus, and allocated 30K bytes of RAM for emWin. I can execute various commands that write to the display (GUI_FillCircle, GUI_Drawline, GUI_DispString), but not commands that read-modify-write to the display (GUI_InvertRect). The display is distorted (the width of all shapes is reduced by half) and the colors are not properly inverted.

    It seems that emWin performs two 16-bit reads for each pixel, saving the first 16-bit word as the Red value and the second as the Blue value. Nothing is read for the Green value, which defaults to zero.

    Because two pixels (words) are read from the SSD1963 and combined into one pixel in the emWin memory, the shape width is reduced by half. Also the color values are interpreted incorrectly.

    Things get more interesting when working with text. If I first set the text mode to XOR with GUI_SetTextMode(GUI_TM_XOR) and then display text with GUI_DispString, it appears that emWin performs four 16-bit reads for each pixel; the first two reads are dummy, the next two are the Red and Blue values as above, and Green again defaults to zero.

    I believe that I have configured emWin correctly, since all the write routines are working properly. Is this a bug in emWin? I suspect so, since the read operations are inconsistent without changing the configuration. Has anyone out there been able to perform read-modify-write operations using emWin on an SSD1963?


    Regards
    Sol :)
  • Hi,

    Please try to set a different read function. There are two ways you can try.

    First, call GUIDRV_FlexColor_SetReadFunc66720_B16(GUIDRV_FLEXCOLOR_READ_FUNC_II). This changes the way how the data gets processed.

    Please also refer to the 'Configuration API' table in chapter 33.7.4 'GUIDRV_FlexColor' of the emWin user manual.

    If that doesn't work you can also set a custom read function by a call of LCD_SetDevFunc(). This is described a page before the 'Configuration API' table.

    Regards
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.