Go Down

Topic: 3.5" ILI9488/ILI9486 w ESP32 (Read 589 times) previous topic - next topic

joshferg

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!

david_prentice

#1
Sep 12, 2017, 12:31 am Last Edit: Sep 12, 2017, 12:32 am by david_prentice
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. 

themanfrommoon

Hello,

Quote
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

ZinggJM

@joshferg

Your display seems to have the same pinout as 3.5 tft spi unknown
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

bodmer

@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.



Formerly Rowboteer (now a broken user profile!)

themanfrommoon

#5
Dec 12, 2017, 11:09 pm Last Edit: Dec 12, 2017, 11:10 pm by themanfrommoon
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

quamikazee

The aliexpress listing specifically says for "Arduino DIY KIT"

bodmer

@themanfromthemoon

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

Code: [Select]

// 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
Formerly Rowboteer (now a broken user profile!)

themanfrommoon

#8
Dec 16, 2017, 01:51 am Last Edit: Dec 16, 2017, 01:53 am by themanfrommoon
Hello Bodmer,

It is still not workung :-(
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
Quote
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

bodmer

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.
Formerly Rowboteer (now a broken user profile!)

themanfrommoon

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

themanfrommoon

Okay, now it works :-)

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


:-) Thanks a lot for your great work!

Best regards,
Chris

themanfrommoon

@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

Go Up