just got the above 2.4" LCD working, but have a strange problem - at least I think it is a problem. When I send 0xffff to the display it is black, but sending 0x0000 it goes white! Other NHD TFTs I have used go black with 0x0000 and white with 0xffff.
Is this normal, or do I have something set wrong?
Thanks,
David
void LCD_INIT(void)
{
gpio_set_pin_low(LCD_nWR);
gpio_set_pin_low(LCD_nRESET);// gpio_local_clr_gpio_pin(LCD_nRESET); //cycle the reset line
delay_ms(250);
gpio_set_pin_high(LCD_nRESET);// gpio_local_set_gpio_pin(LCD_nRESET); //cycle the reset line
delay_ms(250);
TFT_24S_Write_Command(0x0028);//display OFF
TFT_24S_Write_Command(0x0011);TFT_24S_Write_Data(0x0000); //exit SLEEP mode
TFT_24S_Write_Command(0x00C0);TFT_24S_Write_Data(0x0026);TFT_24S_Write_Data(0x0004); //power control 1
TFT_24S_Write_Command(0x00C1);TFT_24S_Write_Data(0x0004); //power control 2
TFT_24S_Write_Command(0x00C5);TFT_24S_Write_Data(0x0034);TFT_24S_Write_Data(0x0040); //VCOM control 1
TFT_24S_Write_Command(0x0036);TFT_24S_Write_Data(0x0088); //memory access control = BGR
TFT_24S_Write_Command(0x00B1);TFT_24S_Write_Data(0x0000);TFT_24S_Write_Data(0x0018); //frame rate control
TFT_24S_Write_Command(0x00B6);TFT_24S_Write_Data(0x000A);TFT_24S_Write_Data(0x00A2); //display function control
TFT_24S_Write_Command(0x00C7);TFT_24S_Write_Data(0x00C0); //VCOM control 2
TFT_24S_Write_Command(0x003A);TFT_24S_Write_Data(0x0055); //pixel format = 16 bit per pixel
TFT_24S_Write_Command(0x002A);TFT_24S_Write_Data(0x0000); //column address set
TFT_24S_Write_Data(0x0000); //start 0x0000
TFT_24S_Write_Data(0x0000);
TFT_24S_Write_Data(0x00EF); //end 0x00EF
TFT_24S_Write_Command(0x002B);TFT_24S_Write_Data(0x0000); //page address set
TFT_24S_Write_Data(0x0000); //start 0x0000
TFT_24S_Write_Data(0x0001);
TFT_24S_Write_Data(0x003F);
TFT_24S_Write_Command(0x0020);
delay_ms(100);
TFT_24S_Write_Command(0x0029);//display ON
delay_ms(10);
return;
}