NHD-2.4-240320CF-CSXN-F only white screen
I am working with NHD-2.4-240320CF-CSXN-F with PSoC6 BLE Pioneer kit using the 8bit option.
I am only getting the white screen and nothing else.
I am using the test code mentioned.
Please help
-
Hello Shankar,
Can you please clarify which test code you are using so that we can verify it on our end? In the mean time, you may use this new example code as a reference, which I have verified to be working with the NHD-2.4-240320CF-CSXN-F display.
0 -
i am using the below:
/*******************************************************************************/
void TFT_24_7789_Write_Command(unsigned int command)
{
GPIO_ResetBits(GPIOC, CS1);
GPIO_ResetBits(GPIOC, RS);
GPIO_SetBits(GPIOC, nRD);
GPIO_ResetBits(GPIOC, nWR);
GPIO_Write(GPIOB, command);
TFT_delay(10);
GPIO_SetBits(GPIOC, nWR);
TFT_delay(1);
}
/*******************************************************************************/
void TFT_24_7789_Write_Data(unsigned int data1)
{
GPIO_Write(GPIOB, data1);
GPIO_SetBits(GPIOC, RS);
GPIO_ResetBits(GPIOC, nWR);
TFT_delay(1);
GPIO_SetBits(GPIOC, nWR);
}
/*******************************************************************************/
void TFT_24_7789_Init(void)
{
int n;
GPIO_ResetBits(GPIOC, CS1);
GPIO_SetBits(GPIOC, nRD);
GPIO_ResetBits(GPIOC, nWR);
GPIO_WriteBit(GPIOC, RES, Bit_RESET);
TFT_delay(100);
GPIO_WriteBit(GPIOC, RES, Bit_SET);
TFT_delay(100);
TFT_24_7789_Write_Command(0x0011);//exit SLEEP mode
TFT_delay(100);
TFT_24_7789_Write_Command(0x0036);
TFT_24_7789_Write_Data(0x0080);//MADCTL: memory data access control
TFT_24_7789_Write_Command(0x003A);
TFT_24_7789_Write_Data(0x0066);//COLMOD: Interface Pixel format
TFT_24_7789_Write_Command(0x00B2);
TFT_24_7789_Write_Data(0x000C);
TFT_24_7789_Write_Data(0x0C);
TFT_24_7789_Write_Data(0x00);
TFT_24_7789_Write_Data(0x33);
TFT_24_7789_Write_Data(0x33);//PORCTRK: Porch setting
TFT_24_7789_Write_Command(0x00B7);
TFT_24_7789_Write_Data(0x0035);//GCTRL: Gate Control
TFT_24_7789_Write_Command(0x00BB);
TFT_24_7789_Write_Data(0x002B);//VCOMS: VCOM setting
TFT_24_7789_Write_Command(0x00C0);
TFT_24_7789_Write_Data(0x002C);//LCMCTRL: LCM Control
TFT_24_7789_Write_Command(0x00C2);
TFT_24_7789_Write_Data(0x0001);
TFT_24_7789_Write_Data(0xFF);//VDVVRHEN: VDV and VRH Command Enable
TFT_24_7789_Write_Command(0x00C3);
TFT_24_7789_Write_Data(0x0011);//VRHS: VRH Set
TFT_24_7789_Write_Command(0x00C4);
TFT_24_7789_Write_Data(0x0020);//VDVS: VDV Set
10
TFT_24_7789_Write_Command(0x00C6);
TFT_24_7789_Write_Data(0x000F);//FRCTRL2: Frame Rate control in normal mode
TFT_24_7789_Write_Command(0x00D0);
TFT_24_7789_Write_Data(0x00A4);
TFT_24_7789_Write_Data(0xA1);//PWCTRL1: Power Control 1
TFT_24_7789_Write_Command(0x00E0);
TFT_24_7789_Write_Data(0x00D0);
TFT_24_7789_Write_Data(0x0000);
TFT_24_7789_Write_Data(0x0005);
TFT_24_7789_Write_Data(0x000E);
TFT_24_7789_Write_Data(0x0015);
TFT_24_7789_Write_Data(0x000D);
TFT_24_7789_Write_Data(0x0037);
TFT_24_7789_Write_Data(0x0043);
TFT_24_7789_Write_Data(0x0047);
TFT_24_7789_Write_Data(0x0009);
TFT_24_7789_Write_Data(0x0015);
TFT_24_7789_Write_Data(0x0012);
TFT_24_7789_Write_Data(0x0016);
TFT_24_7789_Write_Data(0x0019);//PVGAMCTRL: Positive Voltage Gamma control
TFT_24_7789_Write_Command(0x00E1);
TFT_24_7789_Write_Data(0x00D0);
TFT_24_7789_Write_Data(0x0000);
TFT_24_7789_Write_Data(0x0005);
TFT_24_7789_Write_Data(0x000D);
TFT_24_7789_Write_Data(0x000C);
TFT_24_7789_Write_Data(0x0006);
TFT_24_7789_Write_Data(0x002D);
TFT_24_7789_Write_Data(0x0044);
TFT_24_7789_Write_Data(0x0040);
TFT_24_7789_Write_Data(0x000E);
TFT_24_7789_Write_Data(0x001C);
TFT_24_7789_Write_Data(0x0018);
TFT_24_7789_Write_Data(0x0016);
TFT_24_7789_Write_Data(0x0019);//NVGAMCTRL: Negative Voltage Gamma control
TFT_24_7789_Write_Command(0x002A);
TFT_24_7789_Write_Data(0x0000);
TFT_24_7789_Write_Data(0x0000);
TFT_24_7789_Write_Data(0x0000);
TFT_24_7789_Write_Data(0x00EF);//X address set
TFT_24_7789_Write_Command(0x002B);
TFT_24_7789_Write_Data(0x0000);
TFT_24_7789_Write_Data(0x0000);
TFT_24_7789_Write_Data(0x0001);
TFT_24_7789_Write_Data(0x003F);//Y address set
TFT_delay(10);
}
/*******************************************************************************/I have adjusted the control signals accordingly with my MCU
0 -
Also i connected IM0 to 3.3v to select 8bit communication
0 -
Hi Shankar,
Please try updating your initialization sequence with the values below:
comm_out(0x28); //display off comm_out(0x11); //exit SLEEP mode delay(100); comm_out(0x36); //MADCTL: memory data access control data_out(0x10); //changing from 0x88 comm_out(0x20); //display inversion OFF comm_out(0x3A); //COLMOD: Interface Pixel format *** 65K-colors in 16bit/pixel (5-6-5) format when using 16-bit interface to allow 1-byte per pixel data_out(0x55); //0x55 = 65k //0x65 = 262k comm_out(0xB2); //PORCTRK: Porch setting data_out(0x0C); data_out(0x0C); data_out(0x00); data_out(0x33); data_out(0x33); comm_out(0xB7); //GCTRL: Gate Control data_out(0x35); comm_out(0xBB); //VCOMS: VCOM setting data_out(0x2B); comm_out(0xC0); //LCMCTRL: LCM Control data_out(0x2C); comm_out(0xC2); //VDVVRHEN: VDV and VRH Command Enable data_out(0x01); data_out(0xFF); comm_out(0xC3); //VRHS: VRH Set data_out(0x11); comm_out(0xC4); //VDVS: VDV Set data_out(0x20); comm_out(0xC6); //FRCTRL2: Frame Rate control in normal mode data_out(0x0F); comm_out(0xD0); //PWCTRL1: Power Control 1 data_out(0xA4); data_out(0xA1); comm_out(0xE0); //PVGAMCTRL: Positive Voltage Gamma control data_out(0xD0); data_out(0x00); data_out(0x05); data_out(0x0E); data_out(0x15); data_out(0x0D); data_out(0x37); data_out(0x43); data_out(0x47); data_out(0x09); data_out(0x15); data_out(0x12); data_out(0x16); data_out(0x19); comm_out(0xE1); //NVGAMCTRL: Negative Voltage Gamma control data_out(0xD0); data_out(0x00); data_out(0x05); data_out(0x0D); data_out(0x0C); data_out(0x06); data_out(0x2D); data_out(0x44); data_out(0x40); data_out(0x0E); data_out(0x1C); data_out(0x18); data_out(0x16); data_out(0x19); comm_out(0x2A); //X address set data_out(0x00); data_out(0x00); data_out(0x00); data_out(0xEF); comm_out(0x2B); //Y address set data_out(0x00); data_out(0x00); data_out(0x01); data_out(0x3F); delay(10); comm_out(0x29); //display ON delay(10);
Please also verify you are using an additional function to write data to the display after initialization using the memory write 0x2C command.
0
Please sign in to leave a comment.
Comments
4 comments