TFT with SSD1963 controller

01 Aug 2012

Hello everyone .. I bought this display: http://imall.iteadstudio.com/display/tft-lcm/im120419008.html. Which library can I use to make it work with the mbed?.

This display features a SSD1963.

Thanks to all

03 Aug 2012

I found these drivers: http://mbed.org/users/andrewcrussell/code/Display_Driver/

I connected the display to mbed following the instructions but does not work. Someone has already tried?

06 Aug 2012

Hello Emanuele, does you see nothing or rubbish ?

The timing has to fit to the LCD. If there is a lib for a other platform, check/grab the init sequence.

07 Aug 2012

There is a note on the Library Page:

"does Not work Yet"

The author's work on this library is not finished.

07 Aug 2012

which TFT lcd did you use? 3.5, 4.3, 5.0, 7.0 TFT-SSD1963 controller

I hope that source code below can help you and you need to read datasheet of SSD1963 to understand and modify code to satisfy your host controller appropriately

http://www.newhavendisplay.com/app_notes/TFT_35M.txt

Don't depend on the library passively, read it, understand it, fix it or write it by yourself, at that time you can do anything you want with it

have fun!

ttnghiabk

07 Aug 2012

With the sample code does not see anything.

I'm using the 5-inch display.

I'm studying the initialization sequences and try to change the code. Thanks for your answers

07 Aug 2012

You can also have a look to my older tft lib whithout DMA as start point: http://mbed.org/users/dreschpe/code/SPI_TFT/file/3cfa9bb9b070/SPI_TFT.cpp

This lib is using spi to drive the tft. You have to change the rd_reg and wr_reg to use parallel and tft_reset to use the right init parameter. The command code for setting pixels will also be different for the SSD1963. Microchip has a graphic lib wich came with sorce code. I think there lib is supporting SSD1963.

15 Aug 2012

Thank to everyone for the help. I tried to modify the code (By following the specifications) of the library: http://mbed.org/users/andrewcrussell/code/Display_Driver/

The transmission is an 8-bit and the display is a 5-inch 800x480.

The display still works, it displays a white screen.

my code :

#include "mbed.h"
#include "stdlib.h"
#include "string.h"
//---------------------------------------------------------
unsigned char command;
unsigned char data1;
int DOWN;
int RIGHT;
//---------------------------------------------------------
//DigitalOut RS(p14);                         /* reset  to SSD1963 */
DigitalOut nWR(p15);                        /* write out to SSD1963 active LOW */
DigitalOut nRD(p16);                        /* read data from SSD1963 active LOW */
DigitalOut CS(p13);                         /* chip select the SSD1963 active LOW */
DigitalOut DC(p17);                         /* Data/Command Select: 1=Command,  0=Data); */
DigitalOut myled(LED1);                     /* for test purposes only */

/* data bus I/O pins */

Serial pc(p28,p27);

//BusInOut DB(p12,p11,p10,p9,p8,p7,p6,p5);    /* databus D0-D7 */

BusInOut DB(p5,p6,p7,p8,p9,p10,p11,p12);    /* databus D0-D7 */

/*Following are HARD WIRED on the controller  board */
//DigitalIn DOWN = P3^6;
//sbit RIGHT = P3^2;

//******************************************************************************
void Write_Command(unsigned char command) {
    nRD = 1;        /* make sure the RD  is HIGH just to be sure */
    DC=1;
    nWR  = 0;
    CS=0;
    wait_us(1);
    DB=command;
    DB.write(command);
    //DB=command;
    wait_us(1);
    nWR  = 1;
    CS = 1;

}
//;******************************************************************************
void Write_Data(unsigned char data1) {
    nRD = 1;
    DC=0;
    nWR  = 0;
    CS=0;
    wait_us(1);
    DB=data1;
    DB.write(data1);
    //DB=data1;
    wait_us(1);
    nWR  = 1;
    CS = 1;
}
//====================================================
void Command_Write(unsigned char REG,unsigned char VALUE) {
    Write_Command(REG);
    Write_Data(VALUE);
}
//======================================================
void SendData(unsigned long color) {
    Write_Data((color)>>16);    //red
    Write_Data((color)>>8);     //green
    Write_Data(color);          //blue
}
//======================================================
// initialize controller
//======================================================
void Init_SSD1963 (void) {
    pc.printf("Start init \n");
    
//RESET = 0;
    wait_ms(5);
//RESET = 1;
//myled-!myled;
    DOWN = 0;
    RIGHT = 1;
    wait_ms(100);
    Write_Command(0x01);     //Software Reset
    wait_ms(100);
    Write_Command(0x01);
    Write_Command(0x01);
    wait_ms(10);
    
    Command_Write(0xe0,0x01);    //START PLL
    Command_Write(0xe0,0x03);    //LOCK PLL
    
    Write_Command(0xb0);        //LCD specification
    Write_Data(0x20);            //SET TFT MODE & hsync+Vsync+DEN MODE
    Write_Data(0x00);            //SET TFT MODE & hsync+Vsync+DEN MODE
    Write_Data(0x03);            //SET horizontal size=800-1 HightByte
    Write_Data(0x1f);            //SET horizontal size=800-1 LowByte
    Write_Data(0x01);            //SET vertical size=480-1 HightByte
    Write_Data(0xdf);            //SET vertical size=480-1 LowByte
    Write_Data(0x00);            //SET even/odd line RGB seq.=RGB
    wait_ms(5);
    
    Command_Write(0xf0,0x00);    //SET pixel data I/F format=8bit
    
    //Command_Write(0x3a,0x60);   // SET R G B format = 6 6 6
    
    Write_Command(0xe6);           //PLL setting for PCLK, depends on resolution
    Write_Data(0x00);
    Write_Data(0xff);
    Write_Data(0xbe);
    
    Write_Command(0xb4);        //SET HBP,
    Write_Data(0x03);            //SET HSYNC Total=928 HightByte
    Write_Data(0xa0);            //SET HSYNC Total=928 LowByte
    Write_Data(0x00);            //SET HBP 46 HightByte
    Write_Data(0x2e);            //SET HBP 46 LowByte
    Write_Data(0x30);            //SET VBP 48 
    Write_Data(0x00);            //SET Hsync pulse start position  (15 HighByte)
    Write_Data(0x0f);            //15 LowByte
    Write_Data(0x00);            //SET Hsync pulse subpixel start position
    
    Write_Command(0xb6);         //SET VBP,
    Write_Data(0x02);            //SET Vsync total=525 HighByte
    Write_Data(0x0d);            // 525 LowByte
    Write_Data(0x00);            //SET VBP=16 HighByte
    Write_Data(0x10);            // 16 LowByte
    Write_Data(0x10);            //SET Vsync pulse 16
    Write_Data(0x00);            //SET Vsync pulse start position (8 HighByte)
    Write_Data(0x08);            //8 LowByte
    
    /*Write_Command(0x2a);        //SET column address
    Write_Data(0x00);            //SET start column address=0
    Write_Data(0x00);
    Write_Data(0x03);            //SET end column address=639
    Write_Data(0x1f);*/
    
    /*Write_Command(0x2b);        //SET page address
    Write_Data(0x00);            //SET start page address=0
    Write_Data(0x00);
    Write_Data(0x01);            //SET end page address=479
    Write_Data(0xdf);*/
    
    Command_Write(0x36,0x00);    //Rotation
    
    Write_Command(0x29);        //SET display on
    
    Write_Command(0x00be);         //SET PWM for B/L
    Write_Data(0x0006);    
    Write_Data(0x00f0);   
    Write_Data(0x0001);  
    Write_Data(0x00f0);  
    Write_Data(0x0000);  
    Write_Data(0x0000);  
    
    Write_Command(0x00d0);       
    Write_Data(0x000d);   
    
    //Reset GPIO0
    Write_Command(0x00b8);       
    Write_Data(0x0000);    
    Write_Data(0x0001); 
    
    Write_Command(0x00ba);       
    Write_Data(0x0000);    
       
    
    
    pc.printf("End init \n");
}
//======================================================
void WindowSet(unsigned int s_x,unsigned int e_x,unsigned int s_y,unsigned int e_y) {
    Write_Command(0x2a);        //SET page address
    Write_Data((s_x)>>8);       //SET start page address=0
    Write_Data(s_x&0x00ff);
    Write_Data((e_x)>>8);       //SET end page address=639
    Write_Data(e_x&0x00ff);
    Write_Command(0x2b);        //SET column address
    Write_Data((s_y)>>8);       //SET start column address=0
    Write_Data(s_y&0x00ff);
    Write_Data((e_y)>>8);       //SET end column address=479
    Write_Data(e_y&0x00ff);

}
//=======================================
void FULL_ON(unsigned long dat) {
    unsigned char x,y;
    WindowSet(0x0000,0x031f,0x0000,0x01df);
    Write_Command(0x2c);
    for (x=0;x<480;x++) {
        for (y= 0;y<800;y++) {
            SendData(dat);
            pc.printf("x:%n   y:%n", x, y);
        }
    }
}
//=======================================
void QUADS() {
    unsigned int i,j;

    WindowSet(0x0000,0x031f,0x0000,0x01df);

    Write_Command(0x2c);

    for (j= 0 ;j<240;j++) {
        for (i=0;i<320;i++) {
            SendData(0x0000FF);             //blue
        }
        /*for (i=0;i<320;i++) {
            SendData(0xFF0000);             //red
        }*/
    }
    /*for (j= 0 ;j<240;j++) {
        for (i=0;i<320;i++) {
            SendData(0xFFFF00);             //yellow
        }
        for (i=0;i<320;i++) {
            SendData(0x00FF00);             //green
        }
    }*/
}
//=======================================
int main(void) {
    wait_ms(100);
    myled=1;
    wait_ms(500);
    myled=!myled;
    wait_ms(500);
    myled=!myled;
    Init_SSD1963();
    while (1) {
        pc.printf("CICLO \n");
        myled=!myled;
        wait_ms(5);
        pc.printf("Function: QUADS  \n");
        QUADS();
        //pc.printf("Function: FULL_ON  \n");
        //FULL_ON(0x0000ff);        //blue
        
        myled=!myled;
        wait(2);

    }
}
15 Aug 2012

I had a quick look at your code. It seems to me that you have an incorrect controlsignal for data and commands. The DC signal should be 1 for data and 0 for commands. Your code for write_command sets DC at 1, which means you are actually writing data rather than a command. Same problem with write_data.

16 Aug 2012

I read the website for the manufacturer and I understand that the display only works in 16 bit. I reversed the DC signal in the two functions (date and command) but still does not work

The strange thing is that the display is all white, not even a little trash.

The changes are:

......

BusInOut DB(p28,p27,p26,p25,p24,p23,p22,p21, p12,p11,p10,p9,p8,p7,p6,p5);  //16bit (DB15 - DB8, DB7 - DB0)


......

//******************************************************************************
void Write_Command(unsigned char command) {
    nRD = 1;        /* make sure the RD  is HIGH just to be sure */
    DC=0;
    nWR  = 0;
    CS=0;
    wait_us(1);
    DB=command;
    DB.write(command);
    //DB=command;
    wait_us(1);
    nWR  = 1;
    CS = 1;

}
//;******************************************************************************
void Write_Data(unsigned char data1) {
    nRD = 1;
    DC=1;
    nWR  = 0;
    CS=0;
    wait_us(1);
    DB=data1;
    DB.write(data1);
    //DB=data1;
    wait_us(1);
    nWR  = 1;
    CS = 1;
}

.......

12 Mar 2013

Just to see what can you do with this controller:

http://youtu.be/7TZ0zIe6WRo

07 Dec 2014
15 Oct 2015

/media/uploads/Lcdssd1963/img_20151114_130438.jpg Hello I have KD 20070 LCD and ssd 1963 controller. Can any one please help me by sending working c code for that......!!!!!???

Please reply...

Thank you..

02 Nov 2015

Hi I need drive a 7’inch TFT LCD for a home automation project, but my PCB drawing isn’t work. I don’t know why work isn’t. Did you have a schematic for drive a 7’inch TFT LCD by SSD1963? Thanks. Hamidasgari