Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ypkdani

Pages: [1]
1
TFTs / Re: TFT NHD-2.4-240320CF-CSXN#-FT
« on: January 17, 2017, 02:24:19 AM »
Hello,

some one use the 8 bit interface? i don't understand why it not work. Thanks

2
TFTs / TFT NHD-2.4-240320CF-CSXN#-FT
« on: January 13, 2017, 02:54:54 AM »
Hello,

i have a problem with the tft using the 8bit interface.  I have connect the pin with the pinout of pag5 :

http://www.newhavendisplay.com/specs/NHD-2.4-240320CF-CSXN-FT.pdf

and i use this code for init the lcd:

LCD_SendCMD(0x0028); //exit sleep
   WAIT_Waitms(200);
   LCD_SendCMD(0x0011); //exit sleep
   WAIT_Waitms(200);

   LCD_SendCMD(0x0036);
   LCD_SendData(0x0000);//MADCTL: memory data access control
   LCD_SendCMD(0x003A);
   LCD_SendData(0x0055);//COLMOD: setto 65k e 16bit di colori
   LCD_SendCMD(0x00B2);
   LCD_SendData(0x000C);
   LCD_SendData(0x000C);
   LCD_SendData(0x0000);
   LCD_SendData(0x0033);
   LCD_SendData(0x0033);//PORCTRK: Porch setting
   LCD_SendCMD(0x00B7);
   LCD_SendData(0x0035);//GCTRL: Gate Control
   LCD_SendCMD(0x00BB);
   LCD_SendData(0x002B);//VCOMS: VCOM setting
   LCD_SendCMD(0x00C0);
   LCD_SendData(0x002C);//LCMCTRL: LCM Control
   LCD_SendCMD(0x00C2);
   LCD_SendData(0x0001);
   LCD_SendData(0xFF);//VDVVRHEN: VDV and VRH Command Enable
   LCD_SendCMD(0x00C3);
   LCD_SendData(0x0011);//VRHS: VRH Set
   LCD_SendCMD(0x00C4);
   LCD_SendData(0x0020);//VDVS: VDV Set
   LCD_SendCMD(0x00C6);
   LCD_SendData(0x000F);//FRCTRL2: Frame Rate control in normal mode
   LCD_SendCMD(0x00D0);
   LCD_SendData(0x00A4);
   LCD_SendData(0x00A1);//PWCTRL1: Power Control 1
   LCD_SendCMD(0x00E0);
   LCD_SendData(0x00D0);
   LCD_SendData(0x0000);
   LCD_SendData(0x0005);
   LCD_SendData(0x000E);
   LCD_SendData(0x0015);
   LCD_SendData(0x000D);
   LCD_SendData(0x0037);
   LCD_SendData(0x0043);
   LCD_SendData(0x0047);
   LCD_SendData(0x0009);
   LCD_SendData(0x0015);
   LCD_SendData(0x0012);
   LCD_SendData(0x0016);
   LCD_SendData(0x0019);//PVGAMCTRL: Positive Voltage Gamma control
   LCD_SendCMD(0x00E1);
   LCD_SendData(0x00D0);
   LCD_SendData(0x0000);
   LCD_SendData(0x0005);
   LCD_SendData(0x000D);
   LCD_SendData(0x000C);
   LCD_SendData(0x0006);
   LCD_SendData(0x002D);
   LCD_SendData(0x0044);
   LCD_SendData(0x0040);
   LCD_SendData(0x000E);
   LCD_SendData(0x001C);
   LCD_SendData(0x0018);
   LCD_SendData(0x0016);
   LCD_SendData(0x0019);//NVGAMCTRL: Negative Voltage Gamma control
   LCD_SendCMD(0x002A);
   LCD_SendData(0x0000);
   LCD_SendData(0x0000);
   LCD_SendData(0x0000);
   LCD_SendData(0x00EF);//X address set
   LCD_SendCMD(0x002B);
   LCD_SendData(0x0000);
   LCD_SendData(0x0000);
   LCD_SendData(0x0001);
   LCD_SendData(0x003F);//Y address set
   WAIT_Waitms(100);

but the lcd don't work, nothing happen. I send the data in 16bit 5-6-5rgb

I send the data with:

/*
 * Autore: WT
 * Data: 17/06/2013
 *
 * Funzione che invia allo schermo LCD un comando a 8bit
 * passato alla funzione mediante "data"
 * 
 */
void __attribute__((optimize("-O0"))) LCD_SendCMD(unsigned int data){

   GPIO_DRV_ClearPinOutput(LCD_CS);//chip select low
   GPIO_DRV_SetPinOutput(LCD_RD);//read strobe high
   GPIO_DRV_ClearPinOutput(LCD_DATA);//command
   GPIO_DRV_ClearPinOutput(LCD_WR);//WR low
   GPIOC_PDOR = data & 0xFF;
   GPIO_DRV_SetPinOutput(LCD_WR);//WR high
}

/*
 * Autore: WT
 * Data: 17/06/2013
 *
 * Funzione che invia allo schermo LCD un dato a 8bit
 * passato alla funzione mediante "data"
 * 
 */
void __attribute__((optimize("-O0"))) LCD_SendData(unsigned int data){

   GPIO_DRV_ClearPinOutput(LCD_CS);//chip select low
   GPIO_DRV_SetPinOutput(LCD_RD);//read strobe high
   GPIO_DRV_SetPinOutput(LCD_DATA);//command
   GPIO_DRV_ClearPinOutput(LCD_WR);//WR low
   GPIOC_PDOR = (data>>8) & 0xFF;
   GPIO_DRV_SetPinOutput(LCD_WR);//WR low
   GPIO_DRV_ClearPinOutput(LCD_WR);//WR low
   GPIOC_PDOR = data & 0xFF;
   GPIO_DRV_SetPinOutput(LCD_WR);//WR low
}

if i comment the :

GPIOC_PDOR = (data>>8) & 0xFF;
//GPIO_DRV_SetPinOutput(LCD_WR);//WR low
//GPIO_DRV_ClearPinOutput(LCD_WR);//WR low
GPIOC_PDOR = data & 0xFF;

something work but only 1/2 display with an image distorted

Thanks

Pages: [1]