ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

stwirth
Posts: 9
Joined: Tue Nov 23, 2021 11:11 am

ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

Postby stwirth » Tue Nov 23, 2021 11:38 am

Hello,
I'm trying to get the lvgl example (https://github.com/espressif/esp-idf/tr ... s/lcd/lvgl) working using an ESP32-S3 with an ILI9341 display.

I changed the code to reflect my wiring and the display spec:

Code: Select all

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////// Please update the following configuration according to your LCD spec //////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define EXAMPLE_LCD_PIXEL_CLOCK_HZ     (10 * 1000 * 1000)
#define EXAMPLE_LCD_BK_LIGHT_ON_LEVEL  1
#define EXAMPLE_LCD_BK_LIGHT_OFF_LEVEL !EXAMPLE_LCD_BK_LIGHT_ON_LEVEL
#define EXAMPLE_PIN_NUM_DATA0          13 /// D0
#define EXAMPLE_PIN_NUM_DATA1          7  /// D1
#define EXAMPLE_PIN_NUM_DATA2          8  /// D2
#define EXAMPLE_PIN_NUM_DATA3          9  /// D3         Labels
#define EXAMPLE_PIN_NUM_DATA4          10 /// D4         on
#define EXAMPLE_PIN_NUM_DATA5          11 /// D5         TFT
#define EXAMPLE_PIN_NUM_DATA6          4  /// D6         breakout
#define EXAMPLE_PIN_NUM_DATA7          5  /// D7
#define EXAMPLE_PIN_NUM_PCLK           21 /// WR
#define EXAMPLE_PIN_NUM_CS             12 /// CS
#define EXAMPLE_PIN_NUM_DC             42 /// C/D
#define EXAMPLE_PIN_NUM_RST            -1 /// (not connected)
#define EXAMPLE_PIN_NUM_BK_LIGHT       6  /// Lite

// The pixel number in horizontal and vertical
#define EXAMPLE_LCD_H_RES              240
#define EXAMPLE_LCD_V_RES              320
// Bit number used to represent command and parameter
#define EXAMPLE_LCD_CMD_BITS           8
#define EXAMPLE_LCD_PARAM_BITS         8

#define EXAMPLE_LVGL_TICK_PERIOD_MS    2
After flashing the display remains blank (with backlight on).
The same display works with the tjpgd example in SPI mode.

Any hints on what I might be doing wrong?

Hardware:
ESP32-S3-DevKitC-1
Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket - ILI9341 (https://www.adafruit.com/product/2478)
Pinouts in 8-bit mode: https://learn.adafruit.com/adafruit-2-4 ... -2500743-7

Software:
esp-idf release/v4.4 branch (ddc44956bf718540d5451e17e1becf6c7dffe5b8)

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

Postby ESP_morris » Wed Nov 24, 2021 6:28 am

Have you checked the RD line, it shouldn't be left floating, try connecting to 3.3V

stwirth
Posts: 9
Joined: Tue Nov 23, 2021 11:11 am

Re: ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

Postby stwirth » Wed Nov 24, 2021 10:46 am

That was it! Connected RD to 3.3V and it worked. Such an easy fix!
Thank you so much!

stwirth
Posts: 9
Joined: Tue Nov 23, 2021 11:11 am

Re: ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

Postby stwirth » Wed Nov 24, 2021 2:17 pm

One follow-up issue is that the display is mirrored. I haven't found any config setting yet that would flip it.

stwirth
Posts: 9
Joined: Tue Nov 23, 2021 11:11 am

Re: ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

Postby stwirth » Tue Dec 21, 2021 12:47 pm

Found it:

Code: Select all

esp_lcd_panel_mirror(panel_handle, true, true);
esp_lcd_panel_swap_xy(panel_handle, true);

moefear85
Posts: 44
Joined: Sun Sep 05, 2021 4:55 pm

Re: ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

Postby moefear85 » Fri Jul 01, 2022 7:12 pm

thx for this

moefear85
Posts: 44
Joined: Sun Sep 05, 2021 4:55 pm

Re: ESP32-S3 & ILI9341 LCD lvgl example using the Intel 8080 (parallel) interface

Postby moefear85 » Sat Jul 02, 2022 11:11 am

With color inversion on, I'm seeing a yellow logo on a black background. If I turn off color inversion, the background is then white, but the logo blue. It seems the byte order is wrong, because the logo should be red. Does anyone know how to change this?

swapping the 2 bytes in lvgl configuration didn't help, it garbled the picture. any setting besides rgb565 also garbles the picture. flipping all data pins from 0->7 to 7->0 makes the screen only appear white, no graphics.

fixed it by changing .color_space from ESP_LCD_COLOR_SPACE_RGB to ESP_LCD_COLOR_SPACE_BGR

Who is online

Users browsing this forum: Mycael_ and 49 guests