This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to intialize TFT LCD using spi communication

Hai,

I am siva krishna,I am try to initialize and access the 24bit TFT lcd using LPC2478.
So can anyone help me for this..

Thanks & Regadrs
Siva Krishna

  • What "24-bit LCD" ??

    "using LPC2478"

    An LCD - any LCD - neither knows nor cares what processor is used. All that matters is that it sends the correct signals.

    "can anyone help me for this"

    The Datasheet for the LCD will tell you what you need to do.

    See: www.8052.com/.../160143

  • Hai Andy Neil,

    Thanks for your reply.

    I am try to initialize the TFT LCD with the help of spi communication using LPC2478.

    This is the 24 bit lcd information link
    www.olimex.com/.../GFT035EA320240Y(SPEC).pdf

  • I think you'll really want to study the data sheet for the driver IC, available here: www.olimex.com/.../HX8238A.pdf, to understand how to operate the display.

    Read section 9 of this data sheet a bunch of times, until you feel that you have a good understanding of how to operate the chip. Only then should you start writing code.

    ND

  • Hai.. I am new to TFT and suppose to develop code in SPI for TFT whic use HX8238D. Can you plese help me in
    doing that.

  • 1) Why not start your own thread, instead of piggybacking on an existing thread?

    2) How much work have you done on your own, before posting your help request?

    3) In which way are you supposted to develop the code?

  • Thanks for ur reply Per Westermark.
    1.I came across the forum from google and found that Paval alrady finished the coding. So just continuned the discussion so that i get his contact.
    2.I am trying to implement TFT with HX8238 driver in SPI.
    3.Studied the datasheet and followed the sequence said in that to initilize the TFT.
    >I used SPI @ 10Mhz and DataLatch at rising edge of the clock.8bit communication
    >data were sent in 2 set, First is the Deveice ID(011100RsRW)followed by address
    >Then same deveice ID followed by data.
    Plase find my code below
    -----------------------------------------
    void Init_TFT(void){ TFT_Reset=1; delay_msec(60); TFT_Reset=0; delay_msec(60); TFT_Reset=1; delay_msec(300);

    TFT_Srl_Send(0x72,0x01,0x6300); TFT_Srl_Send(0x72,0x02,0x0200); TFT_Srl_Send(0x72,0x03,0x7184); delay_msec(125); TFT_Srl_Send(0x72,0x04,0x0447);
    TFT_Srl_Send(0x72,0x05,0xB4D4); TFT_Srl_Send(0x72,0x0A,0x4008); delay_msec(50);

    TFT_Srl_Send(0x72,0x0B,0xD400); TFT_Srl_Send(0x72,0x0D,0x1235); delay_msec(250);

    TFT_Srl_Send(0x72,0x0E,0x2B00); delay_msec(250);

    TFT_Srl_Send(0x72,0x0F,0x0000); TFT_Srl_Send(0x72,0x16,0x9F80); TFT_Srl_Send(0x72,0x17,0x2212); delay_msec(250);

    TFT_Srl_Send(0x72,0x1E,0x00DB); delay_msec(250);

    TFT_Srl_Send(0x72,0x30,0x0507); TFT_Srl_Send(0x72,0x31,0x0004); TFT_Srl_Send(0x72,0x32,0x0707); TFT_Srl_Send(0x72,0x33,0x0000); TFT_Srl_Send(0x72,0x34,0x0000); TFT_Srl_Send(0x72,0x35,0x0307); TFT_Srl_Send(0x72,0x36,0x0700); TFT_Srl_Send(0x72,0x37,0x0000); TFT_Srl_Send(0x72,0x3A,0x0000); TFT_Srl_Send(0x72,0x3B,0x0000); delay_msec(250);

    }

    void TFT_Srl_Send(unsigned char Reg_Add,unsigned char Int_Add,unsigned short Data) { unsigned char Lca_Cmd[3];

    Lca_Cmd[0]=Reg_Add; Lca_Cmd[1]=0; Lca_Cmd[2]=Int_Add;

    TFT_nChipSelect =0; DMA_SPI(&Lca_Cmd[0],3); Nop();Nop();Nop(); TFT_nChipSelect =1;

    Lca_Cmd[0]=Reg_Add; Lca_Cmd[1]=(Data&0xFF00)>>8; Lca_Cmd[2]=(Data&0xFF);

    TFT_nChipSelect =0; DMA_SPI(&Lca_Cmd[0],3); Nop();Nop();Nop(); TFT_nChipSelect =1;
    } //-----------------------------------//

    I wish to know how to load the data to the pixels. I have used Parallel communication earlier, were i can select instruction/data using an IO and latch data to
    the parallel data pin. I dont know how to do the same in this SPI

  • Doesn't the Datasheet tell you that?

    This forum clearly tells you how to post source code:
    www.danlhenry.com/.../keil_code.png

    If you managed to miss that, you've probably also missed important details in the Datasheet - so go back and really study it carefully...