Anuj Tanksali

Kinetics with SSD1963 interface

Discussion created by Anuj Tanksali on Aug 13, 2018
Latest reply on Aug 30, 2018 by Jing Pan

Hello,

 

We are using K22FN512VLL12 micro controller which is interfaced to a SSD1963 LCD controller through parallel interface. (please see the attached ckt).

We are using a 480*272 resolution New Haven display (NHD-4.3-480272) .D4D kinetics library is used for GUI. We plan to use 7" LCD with 800*480 resolution.

 

When we connected the 7" LCD and configured the SSD1963 accordingly to use 7" LCD. The D4D gui operations are a bit slower than what we observed in 4.3 inch LCD.

 

the 7" LCD is from Adafruit (adafruit_SPEC-YX700WV03_REV.A-787880)

For 7" LCD whole screen drawing takes around 1.5-2 secs and for 4.3" LCD it takes around 500ms - 1 sec.

the configuration of SSD 1963 is as below

 

settings for 7" and 4.3"

 

#ifndef D4D_SCREEN_7INCH
    //Working set for 4.3 inch LCD
    #define TFT_WIDTH               480ULL
    #define TFT_HSYNC_BACK_PORCH    40LL
    #define TFT_HSYNC_FRONT_PORCH   5LL
    #define TFT_HSYNC_PULSE         15ULL
    #define TFT_HEIGHT              272ULL
    #define TFT_VSYNC_BACK_PORCH    40ULL
    #define TFT_VSYNC_FRONT_PORCH   8ULL
    #define TFT_VSYNC_PULSE         9ULL
#else
    //Working set for 7 inch LCD
    #define TFT_WIDTH               800ULL
    #define TFT_HSYNC_BACK_PORCH    40LL
    #define TFT_HSYNC_FRONT_PORCH   40LL
    #define TFT_HSYNC_PULSE         48ULL
    #define TFT_HEIGHT              480ULL
    #define TFT_VSYNC_BACK_PORCH    39ULL
    #define TFT_VSYNC_FRONT_PORCH   13ULL
    #define TFT_VSYNC_PULSE         3ULL
#endif

 

SSD1963 init

 

 LCD_Reset_Val(1);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0xFFFF);  //Set up Solomon Chip SSD1963
    LCD_Reset_Val(0);                                    //Hardware Reset on the Solomon Chip
    Delay_ms(120);                 
    LCD_Reset_Val(1);
    Delay_ms(120);                 
    
    //Software reset: COMMAND 0x01
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SOFT_RESET);    
    Delay_ms(120);                 

 

    //Set the Multiply and Divider of the Solomon PLL: COMMAND 0xE2
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_PLL_MN);  // Set Multiplier and Divider of PLL for 100MHz
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x1D);               // PLLclk = REFclk * 30 (300MHz)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x02);               // SYSclk = PLLclk / 3  (100MHz)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x04);               // validate M and N
    Delay_ms(1);                 
   
    //Check PLL write: COMMAND(0xE3)                                // Test to read the PLL values that were written to SSD1963
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_GET_PLL_MN);  // Was used to prove valid comms between K22 and SSD1963
    (void)D4DLCDHW_ReadDataWord_SSD1963_16b();                 // Not currently used for anything
    (void)D4DLCDHW_ReadDataWord_SSD1963_16b();
    (void)D4DLCDHW_ReadDataWord_SSD1963_16b();
    
    // Enable PLL: COMMAND 0xE0
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_PLL);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x01);               //Enable PLL
    Delay_ms(100);  // allow stabilize
    
    // Use PLL as system clock:  COMMAND 0xE0
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_PLL);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x03);               //Lock PLL
    
    //Software reset: COMMAND 0x01
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SOFT_RESET);  //Software reset
    Delay_ms(120);                 

 

    D4DLCD_IncreaseSpeed_SSD1963();                                                    //Remove Wait States in FlexBus
    
    //Set the LCD Panel Mode and resolution:  COMMAND 0xB0
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_LCD_MODE);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x28);               // 24-bit, data latch falling edge
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x00);               // DE mode
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((TFT_WIDTH-1) >> 8);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((TFT_WIDTH-1) & 0xff);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((TFT_HEIGHT-1) >> 8);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((TFT_HEIGHT-1) & 0xff);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0);           //RGB

 

    //Set pixel data format for parallel host processsor interface:  COMMAND 0xF0
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_PIXEL_DATA_INTERFACE);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x03);               //Set pixel data I/F format to 16bit-565

 

    //Set address mode: COMMAND 0x36
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_ADDRESS_MODE);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x03);               //BGR

 

    
    // Set LSHIFT freq (DCLK from PLL):  COMMAND 0xE6

 

    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_LSHIFT_FREQ);

 

#ifndef D4D_SCREEN_7INCH
    // for 4.3 inch lcd 12 MHz
    // Typical DCLK TRULY is max 12MHz
    // 12 = 100 * (LCDC_FPR + 1) / 2^20
    // LCD_FPR = 125828 (0x1EB84)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x01);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0xeb);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x84);
#else
    // for 7" LCD 50 MHz
    // Typical DCLK is max 50MHz
    // 50 = 100 * (LCDC_FPR + 1) / 2^20
    // LCD_FPR = 524287 (0x7FFFF)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x07);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0xFF);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0xFF);
#endif
 
    // Set front porch and back porch:  COMMAND 0xB4
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_HORI_PERIOD);
    #define HT (TFT_HSYNC_PULSE + TFT_HSYNC_BACK_PORCH + TFT_WIDTH  + TFT_HSYNC_FRONT_PORCH)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((HT - 1) >> 8);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((HT - 1) & 0xff);
    #define HPS (TFT_HSYNC_PULSE + TFT_HSYNC_BACK_PORCH)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((HPS - 1) / 256);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((HPS - 1) & 0xff);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(TFT_HSYNC_PULSE - 1);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x00);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x00);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x00);

 

    //Set vertical blanking interval: COMMAND 0xB6
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_VERT_PERIOD);
    #define VT    (TFT_VSYNC_PULSE + TFT_VSYNC_BACK_PORCH + TFT_HEIGHT + TFT_VSYNC_FRONT_PORCH)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((VT - 1) >> 8);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((VT - 1) & 0xff);
    #define VSP (TFT_VSYNC_PULSE + TFT_VSYNC_BACK_PORCH)
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((VSP - 1) / 256);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((VSP - 1) & 0xff);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(TFT_VSYNC_PULSE);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x00);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x00);

 

    
    
    // Sets the GPIO so that the controller controls them and they
    // are all set as outputs.  COMMAND 0xB8
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_GPIO_CONF);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x01);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x01);

 

    // Set the GPIO value: COMMAND 0xBA
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_GPIO_VALUE);
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord(0x01);                 // Set GPIO to 1 and turn on LCD DISP
    

 

    // Enter Normal Mode:  COMMAND 0x13
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_ENTER_NORMAL_MODE);

 

    // Exit IDLE Mode:  COMMAND 0x38
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_EXIT_IDLE_MODE);

 

    // Turn on Display:  COMMAND 0x29
    (void)D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord(SSD1963_SET_DISPLAY_ON);
    Delay_ms(10);                 
 

I believe the settings used are max settings and cannot be tweaked further.

Can you please have a look at the code and let me know what can be done to increase the refresh rate of 7" LCD.

What settings need to be modified for increasing the refresh rate.

 

Thanks

 

Regards,

Anuj Tanksali

Attachments

Outcomes