Monday, May 21st 2018, 11:06am UTC+2

You are not logged in.

  • Login
  • Register

Elrandir

Beginner

Date of registration: Apr 18th 2018

Posts: 2

1

Wednesday, April 18th 2018, 1:27pm

emWin and driver for SPI Mono Display

Good afternoon!


I'm working with a demoboard from ST - STM32429-EVAL and trying to learn how to work with Your Library. With a modern displays, everything is fine, the library is connected and it works great! :)


But what if I need to connect an old display type PG12864?


The manual says that there is a controller type 8080 - LH155BA5. This controller supports work on SPI and I was able to display an image on it through my own program.


But how to do this via emWin? Which driver is right, GUIDRV_LIN_1? ?(

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

2

Thursday, April 19th 2018, 4:36pm

Hi,

The GUIDRV_Lin driver works only with a direct interface and access to a framebuffer (like an external SDRAM shared with the LCD controller).

To communicate with display (or an LCD controller) via SPI you would need another driver for an indirect interface. This would be, for example, the GUIDRV_FlexColor driver.

emWin does not support displays, it supports display controller.
To find out which driver you need you should first find out which controller is used on your display and then check if there is a driver available for this controller. Search in the emWin manual for the LCD controller.

For indirect driver you have to set a bunch of routines for writing data and commands and for reading (if it is possible).

Regards,
Sven

Elrandir

Beginner

Date of registration: Apr 18th 2018

Posts: 2

3

Monday, April 23rd 2018, 10:32am

For indirect driver you have to set a bunch of routines for writing data and commands and for reading (if it is possible).

Thanks for the answer! :)
If my controller is not in the list of supported - do I understand correctly that I need to take GUIDRV_Template.c and rework it for me?
Implement the functions LCD_X_Config, LCD_X_DisplayDriver and the function of working with pixels, lines and Rect - this will be enough for the entire functionality of the library?

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

4

Monday, April 23rd 2018, 10:58am

Hi,

Quoted

If my controller is not in the list of
supported - do I understand correctly that I need to take
GUIDRV_Template.c and rework it for me?
Yes. The most important function of the driver to be implemented is _SetPixelIndex() once this is working you should be able to draw onto the LCD. But this won't have the best performance because you would write each single pixel separately.
Once the _SetPixelIndex() is working properly you can start to optimize the driver by reworking the DrawBitline-functions. Instead of writing each single pixel start writing a whole bunch of them.

Regards,
Sven