Newhaven Display Forum

Newhaven Products => Character LCDs => Topic started by: DHARMA on October 14, 2019, 07:02:40 AM

Title: NHD‐C0220BiZ‐FS(RGB)‐FBW‐3VM Initialisation
Post by: DHARMA on October 14, 2019, 07:02:40 AM
Hi all,
I found a issue with this initialisation command sequence
Code: [Select]
/*filling buffer with LCD initialization command sequence*/
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[0] =  0x00;     /*SendLCD_command to the display*/
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[1] =  FUNC_SET_TBL0;
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[2] =  FUNC_SET_TBL1;
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[3] =  0x14;     /*Set BIAS - 1/5*/
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[4] =  0x73; /* Set contrast low byte*/
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[5] =  0x5E; /*ICON display on, Booster on, Contrast high byte*/
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[6] =  0x6D;     /*Follower circuit (internal), amp ratio (6)*/
[b][b] g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[7] =  0x0C; /*Display on*/
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[8] =  0x01; /*Clear display*/
g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[9] =  0x06; /*Entry mode set - increment*/[/b][/b]

/*write text to device as soon as it is ready*/
while(I2c_write(&g_I2c_LCD_Cpu.drivers.i2cDevLCD, &g_I2c_LCD_Cpu.i2cBuffer.i2cTxBuffer[0], 10) == IfxI2c_I2c_Status_nak);
This command sequence works fine, but sometimes after resetting the board i'm getting a blank screen.
I've probed the I2C lines and found that the highlighted commands are not getting properly sent to the LCD.
If i call this init function twice i didn't get the blank screen, but i couldn't able to get the exact root cause for why those 3 commands are not properly sent.