Serial Display Driver with Dual Controller LCD

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

  • Serial Display Driver with Dual Controller LCD

    I am trying to use emWin with a serial LCD display that has two display controllers. The display has a chip select for each controller. My question is where do I place the code to toggle the chip select pins? Or where do I define the routines so that emWin can control the chip select pins? There must be a callback somewhere for this. I was thinking it would be in the "LCD_X_DisplayDriver" routine, but it doesn't appear to have an appropriate CMD for this. By the way, I have already defined the routines for writing to the display in the LCD_X_Serial file. I'm hoping I don't have to treat each controller as a "layer". Thanks for the help!
  • Thank you for the response. I am using the GUIDRV_Dist driver with two instances of the GUIDRV_Page1BPP driver and my code is very similar to that in the user manual. There isn't very much information on it in the user manual. Here is my code...


    void LCD_X_Config(void) {
    GUI_DEVICE * pDevice;
    GUI_DEVICE * pDriver0;
    GUI_DEVICE * pDriver1;
    GUI_RECT Rect0;
    GUI_RECT Rect1;
    //
    // Set display driver and color conversion for 1st layer
    //
    pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_DIST, COLOR_CONVERSION, 0, 0);


    //
    // Display size configuration
    //
    LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS);
    LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS);


    //
    // Create first display driver
    //
    pDriver0 = GUI_DEVICE_Create(GUIDRV_PAGE1BPP, COLOR_CONVERSION, 0, -1);


    //
    // Create second display driver
    //
    pDriver1 = GUI_DEVICE_Create(GUIDRV_PAGE1BPP, COLOR_CONVERSION, 0, -1);


    //
    // Add display drivers to distribution driver
    //
    Rect0.x0 = 0;
    Rect0.y0 = 0;
    Rect0.x1 = 131;
    Rect0.y1 = 63;
    GUIDRV_Dist_AddDriver(pDevice, pDriver0, &Rect0);
    Rect1.x0 = 132;
    Rect1.y0 = 0;
    Rect1.x1 = 239;
    Rect1.y1 = 63;
    GUIDRV_Dist_AddDriver(pDevice, pDriver1, &Rect1);
    }


    In order to write to the display each driver needs to toggle the chip select pin for the respective controller. Do I need to create two versions of the GUIDRV_PAGE1BPP driver? I was thinking there would be a callback or something for each driver instance to do controller specific commands. Thanks!

    The post was edited 2 times, last by mbrossett ().

  • Hello,

    Unfortunately there is currently no ready-to-use possibility to set a certain chip select signal. We will have to discuss this first, but I guess we are going to implement this, so it will be available in the next emWin version.

    Best regards,
    Adrian