AnsweredAssumed Answered

emWin can not read from SSD1963?

Question asked by Philip Hills on Aug 29, 2017
Latest reply on Sep 25, 2017 by Philip Hills

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?