Hi guys
I am this LCD here:
http://www.newhavendisplay.com/specs/NHD-C0216CZ-FSW-FBW-3V3.pdf
When it power up, it some time works, some time just show nothing. Say 30-40% of the time it just show nothing on the display.
I believe it's not a hardware problem, as the LCD is on a demo board, and it works fine on their demo firmware.
Here is my code to initialize the LCD: (feel free to ask if more codes is needed)
I am this LCD here:
http://www.newhavendisplay.com/specs/NHD-C0216CZ-FSW-FBW-3V3.pdf
When it power up, it some time works, some time just show nothing. Say 30-40% of the time it just show nothing on the display.
I believe it's not a hardware problem, as the LCD is on a demo board, and it works fine on their demo firmware.
Here is my code to initialize the LCD: (feel free to ask if more codes is needed)
Code:
void LCD_Initialize(void)
{
LCD_CS = 1;
LCD_RESET = 0;
//DELAY_ms(8);
DELAY_ms(8);
LCD_RESET = 1;
//DELAY_ms(80);
DELAY_ms(20);
LCD_WriteCmd(LCD_WAKEUP);
//DELAY_ms(8);
DELAY_ms(2);
LCD_WriteCmd(LCD_WAKEUP);
LCD_WriteCmd(LCD_WAKEUP);
LCD_WriteCmd(LCD_FUNCTION_SET);
LCD_WriteCmd(LCD_INT_OSC);
LCD_WriteCmd(LCD_PWR_CTRL);
LCD_WriteCmd(LCD_FOLLOWER_CTRL);
LCD_WriteCmd(LCDCMD_CONTRASTSET_LOWBYTE);
LCD_WriteCmd(LCD_ON);
LCD_WriteCmd(LCD_ENTRY_MODE);
LCD_WriteCmd(LCDCMD_CLEARDISPLAY);
DELAY_ms(40);
}