emWin and driver for SPI Mono Display

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

    • 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? ?(
    • 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
    • SEGGER - Schoenen wrote:

      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?
    • Hi,

      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