Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILI9341V LCD driver support (BSP-408) #238

Closed
valkuc opened this issue Oct 24, 2023 · 1 comment · Fixed by #232
Closed

ILI9341V LCD driver support (BSP-408) #238

valkuc opened this issue Oct 24, 2023 · 1 comment · Fixed by #232

Comments

@valkuc
Copy link

valkuc commented Oct 24, 2023

Hi. I recently bought 2.8 IPS display module with ILI9341V chip (like this one http://www.lcdwiki.com/2.8inch_IPS_SPI_Module_ILI9341). The standard esp_lcd_ili9341 driver refused to drive this display. So, I figured out that the difference is in initialization sequence. Here is the code snippet of vendor_specific_init array to make this module working. It will be good it this will be integrated in the esp_lcd_ili9341 driver (probably through Kconfig with ability to select chip).

static const lcd_init_cmd_t vendor_specific_init[] = {
	/* SW reset */
	{LCD_CMD_SWRESET, {0}, 0},
	/* 200 ms delay */
	{0x80, {250}, 1},
	{0xCF, {0x00, 0xC1, 0X30}, 3},
	{0xED, {0x64, 0x03, 0X12, 0X81}, 4},
	{0xE8, {0x85, 0x00, 0x78}, 3},
	{0xCB, {0x39, 0x2C, 0x00, 0x34, 0x02}, 5},
	{0xF7, {0x20}, 1},
	{0xEA, {0x00, 0x00}, 2},
	{0xC0, {0x13}, 1},
	{0xC1, {0x13}, 1},
	{0xC5, {0x22, 0x35}, 2},
	{0xC7, {0xBD}, 1},
	{LCD_CMD_MADCTL, {(LCD_CMD_MV_BIT | 0x08)}, 1},
	{0x3A, {0x55}, 1},  //*** INTERFACE PIXEL FORMAT: 0x66 -> 18 bit; 0x55 -> 16 bit
	{0xF6, {0x01, 0x30}, 2},
	{0xB1, {0x00, 0x1B}, 2},
	{0xF2, {0x00}, 1},
	{0x26, {0x01}, 1},
	/* Positive gamma correction */
	{0xE0, {0x0F, 0x35, 0x31, 0x0B, 0x0E, 0x06, 0x49, 0XA7, 0x33, 0x07, 0x0F, 0x03, 0x0C, 0x0A, 0x00}, 15},
	/* Negative gamma correction */
	{0xE1, {0x00, 0x0A, 0x0F, 0x04, 0x11, 0x08, 0x36, 0x58, 0x4D, 0x07, 0x10, 0x0C, 0x32, 0x34, 0x0F}, 15},

	/* Column address set, SC=0, EC=0xEF */
	{LCD_CMD_CASET, {0x00, 0x00, 0x00, 0xEF}, 4},
	/* Page address set, SP=0, EP=0x013F */
	{LCD_CMD_RASET, {0x00, 0x00, 0x01, 0x3F}, 4},
	/* Memory write */
	{LCD_CMD_RAMWR, {0}, 0},
	/* Entry mode set, Low vol detect disabled, normal display */
	{0xB7, {0x07}, 1},
	/* Display function control */
	{0xB6, {0x08, 0x82, 0x27}, 3},

	/* Sleep out */
	{LCD_CMD_SLPOUT, {0}, 0x80},
	/* Invert colors */
	{LCD_CMD_INVON, {0}, 0},
	/* Display on */
	{LCD_CMD_DISPON, {0}, 0x80},

	{0, {0}, 0xff},
};
@github-actions github-actions bot changed the title ILI9341V LCD driver support ILI9341V LCD driver support (BSP-408) Oct 24, 2023
@Lzw655
Copy link
Collaborator

Lzw655 commented Oct 25, 2023

Hi @valkuc , thanks for your information! The issue you mentioned exists in all LCD drivers because even if the driver IC model is the same, different screens often require configuration with initialization commands provided by the manufacturers.

Fortunately, I've submitted a new PR that allows drivers to obtain initialization commands externally, eliminating the need to modify the code within the driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants