8bit access almost done

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

8bit access almost done

1,592 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by marcellus_pereira on Fri Jun 13 08:01:58 MST 2014
Dear ALL,

after reading the documentation, I was able to almost finish the job and right now my display is showing the attached image. Actually it is the message ^Hello World!^, but, obviously, twisted.

I´m using the LPC2387 and my display is based on the SSD1963 (http://www.agte.com.br/wp-content/uploads/2011/08/AGM-0043WT.pdf). I configured the emWin to 16bits of color ( GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565, 0, 0); ) and 8 bit access ( GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66720, GUIDRV_FLEXCOLOR_M16C0B8); ).

My question is: do I have to write my own custom color conversion routines? I´m just guessing but it seems that the driver is trying to write to the hardware as the follows:

GGGRRRRR
0BBBBBGGG

and my TFT expects:

RRRRRRRR
GGGGGGGG
BBBBBBBB

IF it´s really necessary to write my own custom color conversion routines, it will be usable with the pre-compiled emWin? Is there anyone who sucessfully used the emWin with SSD1963 and 8 bit access?

Thank you very much,

Marcellus

Labels (1)
0 Kudos
6 Replies

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by marcellus_pereira on Tue Jun 17 15:11:13 MST 2014
Thank you very much, Wouter.

Best regards,
Marcellus
0 Kudos

1,061 Views
maurolenz
Contributor I

Hello Marcellus,

I'm having a similar problem with the same display. It seems that the display is in monochromatic colors (orr some shades of gray). Did you face something similar when you worked with it?

Best Regards,

Mauro

0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wouter on Tue Jun 17 13:49:30 MST 2014
Hi Marcellus,

I've received answer back from Segger:

Quote:

Unfortunately the SSD1963 does not support a color depth of 16bpp with 8 bit interface. According to the documentation the 8 bit interface can be used only with a color depth of 24bpp. The driver GUIDRV_FlexColor currently supports only 16bpp and 18bpp. But the SSD1961 could be used with 18bpp and 8 bit interface.

But in fact the currently existing interface routines for 8 bit bus can not be used. As explained in the emWin documentation the driver currently supports a color depth of 16bpp only for that controller. And that requires a 16 bit interface. An 8 bit interface unfortunately can not be used because it is not supported for 16bpp by that controller. We will change that in our documentation.




So unfortunately it's currently not possible to use the FlexColor driver in 8-bit mode with any display controller which is not native 16-bit. I think the previous proposed workaround it the best solution for now.

Regards,
Wouter
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by marcellus_pereira on Tue Jun 17 11:15:28 MST 2014
Thank you very much, Wouter!

I made a small patch and it worked pretty well. But I´ll wait for the answer of Segger.

Best regards,
Marcellus
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wouter on Mon Jun 16 11:58:00 MST 2014
Hi Marcellus,

Can you try replacing the following line:
GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565, 0, 0);
with:
GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_M888, 0, 0);

Does this result in emWin giving three data bytes per pixel?

Regards,
Wouter

EDIT: Saw your reply on the web support, changing to GUICC_M888 does not make any difference. Then it indeed looks like a bug. I'll contact Segger to get a confirmation on this.

For now, the easiest workaround may be to change the driver configuration to 16-bit mode, then chop the 16-bit int you get from emWin into three bytes and transfer these three bytes after each other over your 8-bit interface.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by marcellus_pereira on Fri Jun 13 17:20:46 MST 2014
After further analysis, it seems that the GUIDRV_FLEXCOLOR driver has a bug.

When accessing the SSD1963 using 8 bit interface and 16 bits of color, the controller expects for 3 bytes of information. The driver sends just two.

When I force the third byte, the results can be seen in the pictures attached.

My question now is: is it possible to compile my own driver and use it with the pre compiled library?

Thank you.
0 Kudos