3.5" ILI9488/ILI9486 w ESP32

Hi All,

I'm trying to get this screen to work with an ESP32:

https://www.aliexpress.com/item/Smart-Electronics-3-5-inch-TFT-Touch-Screen-LCD-Module-Display-320-480-ILI9486-with-PCB/32588583847.html?spm=a2g0s.9042311.0.0.Iw57wd

So far I have not been able to find any useful documentation.

I did get the screen to display text using this library (the parallel version of TFT_eSPI):

https://github.com/konkrog/TFT_eSPI

However, the colors are off and the screen is very dim. I am thinking it might be due to this being a 16-bit screen and I only have 8-bit connected.

Is there anyway to tell if the screen is 8 or 16 bit?

I would prefer to use SPI for the connection, but again I'm not able to tell if the screen supports it.

Here are the pins it has:

T_CS
CLK
PEN
F_CS
MISO
MOSI
GND (x2
5V
VDD (x2)
BL
DB0-DB15
RST
WR
RD
CS
RS

I've been trying to get this thing to work for a week with very little success. Any help is greatly appreciated!

I have 4 others boards here as well from different suppliers. If this board is not going to work I can post details on the other boards.

Thanks!

Your display "looks" like 16-bit. Your "library" is using 8-bit.

If you write a 16-bit colour to an 8-bit data bus, you will get mostly blue/green result. (or red/green if the BGR bit is set)

ESP8266 modules don't have enough GPIO for 8-bit parallel.
ESP32 modules have enough pins for 8080-8 but not enough for 8080-16.

I have never managed to get reliable results with MCUFRIEND_kbv as 8080-8 on a ESP32.

I suggest that you determine whether your display is 8080-8 or 8080-16.
Some have accessible IM# pins. It is unlikely to find all three IM# signals. You can often find IM0 which selects 8080-8 or 8080-16.

I suggest that you give up with parallel. Buy an SPI module. Run the original Bodmer library.

David.

Hello,

Buy an SPI module. Run the original Bodmer library.

I have a 3,5" 480x320 Pixel SPI ILI9486 Display and I want to run it with a ESP8266.
(a smaller 2,8" 320x240 Display I have running with an ESP8266 with the TFT_eSPI library from bodmer)

I tried to connect the Display like described on bodmers channel on Github, but I did not get it running.

Has anybody tried the same?
What could be the Problem?
How to contact bodmer?

Thanks and best regards,
Chris

@joshferg

Your display seems to have the same pinout as 3.5 tft spi unknown

@themanfrommoon

TFT_eSPI does work with one serial Raspberry Pi board that is 480x320 pixels. Image of the compatible board is here. This display must be of the Waveshare design and use a 16 bit serial interface based on the 74HC04, 74HC4040 and 2 x 74HC4094 logic chips.

Post a link to/pictures of your board, sayhow you have connected it and how you have configured the setup files inside the TFT_eSPI library.

Hello Bodmer,

I think it looks the same as the picture on your github.


It also has the 74HC04, 74HC4040 and 2 x 74HC4094 logic chips on the PCB.
I wired it according to your picture.
So I guess the hardware is okay.

Maybe the setup files are wrong.
Where are they located?
I think in C:\Users\Chris\Documents\Arduino\libraries\TFT_eSPI-master
Correct?
I tried to edit the User_Setup.h and set the RPI_ILI9486_DRIVER and the PIN numbers, but I'm not sure if I did this correct.
I'm not really sure which files needs to be edited and what needs to be edited.
Can you please advise what exactly to do for this kind of Display?

Thank you a lot for your work and best regards,
Chris

The aliexpress listing specifically says for "Arduino DIY KIT"

@themanfromthemoon

You need to edit the User_Setup_Select.h file so the settings read:

// Customised User_Setup files are stored in the "User_Setups" folder.

// Only ONE line should be uncommented.  Add extra lines and files as needed.

//#include <User_Setup.h>           // Default setup is root library folder

//#include <User_Setups/Setup1_ILI9341.h>  // Setup file configured for my ILI9341
//#include <User_Setups/Setup2_ST7735.h>   // Setup file configured for my ST7735
//#include <User_Setups/Setup3_ILI9163.h>  // Setup file configured for my ILI9163
//#include <User_Setups/Setup4_S6D02A1.h>  // Setup file configured for my S6D02A1
//#include <User_Setups/Setup5_RPi_ILI9486.h>     // Setup file configured for my stock RPi TFT
//#include <User_Setups/Setup6_RPi_Wr_ILI9486.h>  // Setup file configured for my modified RPi TFT
//#include <User_Setups/Setup7_ST7735_128x128.h>  // Setup file configured for my ST7735 128x128 display
//#include <User_Setups/Setup8_ILI9163_128x128.h>  // Setup file configured for my ILI9163 128x128 display
//#include <User_Setups/Setup9_ST7735_Overlap.h>   // Setup file configured for my ST7735
//#include <User_Setups/Setup10_RPi_touch_ILI9486.h>  // Setup file configured for my stock RPi TFT with touch
#include <User_Setups/Setup11_RPi_touch_ILI9486.h>  // Setup file configured for my stock RPi TFT with touch

//#include <User_Setups/SetupX_Template.h> // Setup file template for copying/editting

Notice that one line is not commented out.

Wring must then be:

Display SDO/MISO to NodeMCU pin D6
Display LED to NodeMCU pin VIN (or 5V)
Display SCK to NodeMCU pin D5
Display SDI/MOSI to NodeMCU pin D7
Display DC (or AO)to NodeMCU pin D3
Display RESET to NodeMCU pin D4
Display CS to NodeMCU pin D8
Display GND to NodeMCU pin GND (0V)
Display VCC to NodeMCU 5V or 3.3V
Display Touch_CD to NodeMCU pin D1

Hello Bodmer,

It is still not workung :frowning:
At first I updated your TFT_eSPI library to the latest version.
Then I edited the User_Setup_Select.h according to your advice.
Then I wired it up to your advice, but I noticed a small deviation:

Your picture shows two GND Connections.

But in your description there is only one GND Connection, and one additional 5V or 3.3V connection

Wring must then be:
Display SDO/MISO to NodeMCU pin D6
Display LED to NodeMCU pin VIN (or 5V)
Display SCK to NodeMCU pin D5
Display SDI/MOSI to NodeMCU pin D7
Display DC (or AO)to NodeMCU pin D3
Display RESET to NodeMCU pin D4
Display CS to NodeMCU pin D8
Display GND to NodeMCU pin GND (0V)
Display VCC to NodeMCU 5V or 3.3V
Display Touch_CD to NodeMCU pin D1

Maybe this is the problem.
Where is this connection located on the display?

Thanks and best regards,
Chris

Ah, sorry. I gave you duff info on how to connect up an ESP8266 board!

These are the connections for the ESP32:

TFT_MISO to ESP32 pin 19
TFT_MOSI to ESP32 pin 23
TFT_SCLK to ESP32 pin 18
TFT_CS to ESP32 pin 15
TFT_DC to ESP32 pin 2
TFT_RST to ESP32 pin 4
TOUCH_CS to ESP32 pin 22

Use the setup file as per post #7 above.

Two GND lines are not necessary but help stop power supply noise from affecting the digital circuit.

Hello Bodmer,

no, I have an ESP8266, that is correct. I have no ESP32!
Meanwhile I checked the connections with the waveshare description pinouts.
Everything is correct.
I only added a 3,3V connection (don't know if this is necessary).

Where is the definition of the pins in the setup files?
Maybe there is something wrong?!

Best regards,
Chris

Okay, now it works :slight_smile:

I found the problem.
For the ESP8266 I need to use User_Setups/Setup10_RPi_touch_ILI9486.h

...and for ESP32 I guess one need to use User_Setups/Setup11_RPi_touch_ILI9486.h

:slight_smile: Thanks a lot for your great work!

Best regards,
Chris

@bodmer:

Which is is largest display and what is the highest resolution you know your library works with?

Actually I have 3,5" with 480x320 pixels. But is there more available?

Thanks a lot and best regards,
Chris

Great to hear you have it working. I must read posts more carefully!

I have not looked for higher res displays extensively as they tend to be more expensive and typically do not use SPI. At a certain price point it is more cost effective to buy a cheap Android tablet and create+serve web pages to it.

Hello, guys!
I try to use a touchscreen on display shield, similar of topickaster and TFT_eSPI library from honoured bodmer.

In User_Setup.h i set #define TOUCH_CS PIN_D2, connect the touch_cs to D2 of Wemos D1 mini.
The SPI_TOUCH_FREQUENCY has default value 2500000
Display works perfectly, but touch is unoperatonal.

In description of LCD shield (designed for Raspberry Pi) present a pin 11 (TP_IRQ). It is touchpanel interrupt, low level while the Touch panel detect touching.
But in library this pin is not used.

Where could be a problem?

@SHTIRLITZ

Have you connected up the MISO line? (as shown in the photo in the tools folder and in post #8 on this thread)

TP_IRQ is not needed by the library and does not need to be connected.

Yes, MISO is connected

Test the touch screen with the attached sketch so we can see if communication is occuring.

This is the result where the first 3 lines are no touch, second 3 are a touch near the middle of the screen. Note the large increase in 'Z' which is pressure, also x and y should be about 2000 in the middle of the screen:

x: 661 y: 3949 z: 8
x: 660 y: 3944 z: 12
x: 661 y: 3946 z: 13
x: 2022 y: 2092 z: 1653
x: 2033 y: 2092 z: 1810
x: 2034 y: 2092 z: 1822

Test_Touch_Controller.zip (671 Bytes)

bodmer:
Test the touch screen with the attached sketch so we can see if communication is occuring.

Ok, thanks.
It's working!

Great! That is good to hear.