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

Is it support ILI9488 480x320 in 18bit mode #187

Closed
Super169 opened this issue Aug 11, 2018 · 63 comments
Closed

Is it support ILI9488 480x320 in 18bit mode #187

Super169 opened this issue Aug 11, 2018 · 63 comments

Comments

@Super169
Copy link

I have been using your library with 2.8 inch ILI9341 SPI TFT onitor, it works fine except the touch panel, I have to mix with the XPT2046_Touchscreen library to work with the touch panel.

And I just bought a new 3.5 inch ILI9488 SPI TFT monitor, I have tested the Setup21_ILI9488.h, it can only turn on the backlight, but cannot draw anything on screen.

As discussed with the seller, the ILI9488 is using 18bit instead of 16bit data, which is different from ILI9341, I'd like to like if this library support 18bit data? Thanks.

@Bodmer
Copy link
Owner

Bodmer commented Aug 11, 2018

Yes, the library uses 18 bit for the ILI9488 wirh SPI. Setup 21 is for the ESP32. Check your connections are correct.

To provide more help I need more information on your setup.

@Bodmer
Copy link
Owner

Bodmer commented Aug 11, 2018

Do not connect the TFT SDO (MISO) line if you have a touch controller fitted or intend to use an SD card as that line is permanently enabled on the display.

@Super169
Copy link
Author

Since I have already made a PCB for ILI9341 display, and both of them has the same pin layout (14 pin for TFT & Touch), I just replace the display with ILI9488 using same PCB, and I have updated the pin setting as using with ILI9341:

// For the M5Stack module use these #define lines
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
//#define TFT_CS 14 // Chip select control pin
#define TFT_CS 4 // Chip select control pin
#define TFT_DC 27 // Data Command control pin
#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
#define TFT_BL 32 // LED back-light

Since I also have the M5Stack, I just use similar setting as M5Stack, and only change CS to GPIO-4 as GPIO-14 is reserved for JTAG debug.

For the touch panel, I have merge those common SPI pin in the PCB, so they share the connection to GPIO 18, 19, 23 (i.e. CLK, MISO & MOSI), and I used touch panel's CS to GPIO-25, IRQ to GPIO-26.

THere has no problem sharing the MISO with TFT in XPT2046_Touchscreen, but it doesn't work in this library. So, I have mixed two library to make both working on my ILI9341 display.

But in ILI9488, I have tested with the examples for 480 x 320, but it doesn't work.

I have also try to define M5Stack in the header file of ILI9488 (just uncomment the line), but unfortunately, it doesn't work also.

@Bodmer
Copy link
Owner

Bodmer commented Aug 14, 2018

Run the touch diagnostics sketch to see if the touch controller is working. Edit the pins if you need to in the sketch.

The TFT SDO line must be disconnected as it never goes tristate and thus there will be a bus drive conflict on the MISO line if you leave it connected.

@Super169
Copy link
Author

Yes, you are right. Without connecting TFT's SDO, I can use the touch function.
But there still have nothing to display.

@Bodmer
Copy link
Owner

Bodmer commented Aug 17, 2018

I have connected up an ILI9488 display using the same connections as you have and it work fine...

Run the "Read_User_Setup" sketch and look at the serial output to make sure the pin settings and configuration is being picked up. Post the output here. Try a lower SPI frequency too.

Check your connections are good and check continuity if you can.

@Bodmer Bodmer closed this as completed Aug 31, 2018
@Super169
Copy link
Author

Super169 commented Sep 1, 2018

Sorry for late reply as I was busy in these two weeks, and I just try to get a new TFT for testing, but have same result, only the touch works.

I have executed the sketch with the following output (the pin assignment is correct):
[code]
Processor = ESP32
Frequency = 240 MHz
Transactions = Yes
Interface = SPI
Display driver = 9488
Display width = 320
Display height = 480

MOSI = D23 (GPIO 23)
MISO = D19 (GPIO 19)
SCK = D18 (GPIO 18)
TFT_CS = D4 (GPIO 4)
TFT_DC = D27 (GPIO 27)
TFT_RST = D33 (GPIO 33)

Font GLCD loaded
Font 2 loaded
Font 4 loaded
Font 6 loaded
Font 7 loaded
Font 8 loaded
Smooth font enabled

Display SPI frequency = 27.0 MHz
[/code]

I have try reducing the Display SPI frequency to 10.0 MHz, it still have no display.

Maybe there has different ILI8488 display, and my TFT is different from yours, below is my TFT:
My TFT

My TFT back

@Bodmer
Copy link
Owner

Bodmer commented Sep 1, 2018

Can you run the sketch attached. You will need to edit the pins used in the sketch and make sure the MISO pins is wired up. Post the results here.

This is what I get

Register 0x01: 0x00
Register 0x04: 0x548066
Register 0x09: 0x610000
Register 0x0A: 0x08
Register 0x0B: 0x00
Register 0x0C: 0x06
Register 0x0D: 0x00
Register 0x0E: 0x00
Register 0x0F: 0x00
Register 0x2E: 0x00
Register 0x3F: 0x00
Register 0xDA: 0x56
Register 0xDB: 0x80
Register 0xDC: 0x66

Read_ID_bitbash_ESP32.zip

@Bodmer Bodmer reopened this Sep 1, 2018
@Bodmer
Copy link
Owner

Bodmer commented Sep 1, 2018

Post a link to the TFT seller page too so I can have a look. Many retailers do not know what driver is fitted and get it wrong!

@Super169
Copy link
Author

Super169 commented Sep 2, 2018

Below is the result of Read_ID_bitbash_ESP32:

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7944
entry 0x40080310
TFT driver register values:

Register 0x01: 0x00
Register 0x04: 0x00
Register 0x09: 0xFF00000
Register 0x0A: 0x00
Register 0x0B: 0x00
Register 0x0C: 0x07
Register 0x0D: 0x84
Register 0x0E: 0x00
Register 0x0F: 0x02
Register 0x2E: 0x00
Register 0x3F: 0x10000000
Register 0xDA: 0x00
Register 0xDB: 0x00
Register 0xDC: 0x00

I bought the TFT from China Taobao, detail information can be found in: http://www.lcdwiki.com/zh/3.5inch_SPI_Module_ILI9488_SKU:MSP3520

They only provided the sample for C51 & STM32, and they claimed that the sample for ESP8266 will be available soon.

BTW, I found that they also mentioned this one is using ILI9486 in the production description (https://item.taobao.com/item.htm?id=574941281220), is there any difference between 9488 and 9486? The setup 5, 6, 10, 11 seems for another 9486.

Thanks a lot.

@Bodmer
Copy link
Owner

Bodmer commented Sep 3, 2018

I suspect a different controller is fitted. We could try the ILI9486 init code but we will have to "fool" the library into using 18 bits, I think this is possible by defining both ILI9486 and ILI9488 in the setup:

#define ILI9488_DRIVER
#define ILI9486_DRIVER

Then in your sketch, in setup() after tft.init() add these lines to switch the display to 18 bit:

tft.writecommand(0x3A); // Pixel Interface Format
tft.writedata(0x66);  // 18 bit colour for SPI

Let me know if this works. I have ordered one of those displays to test but it will take a few weeks to be delivered from China.

@Super169
Copy link
Author

Super169 commented Sep 9, 2018

Thanks a lot.
I have tried your suggestion, but still no display.
I don't know if this is the problem of my display, I have received a testing program from the seller, which is a sample running on D1 mini, which only fill the screen with solid color, but it also failed in my displays. I have tested with 2 D1 mini and 1 D1 mini pro board, so it shouldn't be the program of the mcu.

Hoping that you can make it work, as it's really a very cheap display. I'd like to use it in my ESP32 projects.

@Super169
Copy link
Author

Super169 commented Sep 9, 2018

Just make the D1 mini sample works.

The sample code has provided a wrong pin setting, default CS for SPI in D1 mini is D8, but it has marked as D1. After changing the pin, it works now.

My TFT D1 mini

I have upload the D1 mini sample here (note, CS should be D8) https://github.com/Super169/images/blob/master/Others/clear_Screen.ino

It may compare the code sending in this sample.

@Super169
Copy link
Author

Super169 commented Sep 10, 2018

Just try to port the code to ESP32 by changing the pin setting for SPI, it works with my pin assignment:
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 4 // Chip select control pin
#define TFT_DC 27 // Data Command control pin
#define TFT_RS 27 // DC / RS is the same
#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
#define TFT_BL 32 // LED back-light

My ESP32 TFT

Need to compare the initialization code between the sample and yours.

@Bodmer
Copy link
Owner

Bodmer commented Sep 10, 2018

It would be possible to include TFT_eSPI, run tft.init(), then run the unit code from the sketch you have, then the library functions should then work. My display is expected to arrive this week, so I can test it.

@Bodmer Bodmer closed this as completed Sep 10, 2018
@Bodmer Bodmer reopened this Sep 10, 2018
@Super169
Copy link
Author

Yes, you are right.

If I replace the tft.init() with the initialization code from the sample, I can use the TFT by your library. But the image is mirrored, I have tested with different rotation value (0 ~ 3), it's still mirrored.

Then I try to replace ILI9488_Rotation.h with ILI9486_Rotation.h, it become normal for rotation 4 ~ 7. Maybe this display is using ILI9486 instead of ILI9488.

The following screen is running with setRotataion(5), and using ILI9486_Rotation.h.
TFT

@Bodmer
Copy link
Owner

Bodmer commented Sep 11, 2018

OK, that is good to know. I expect the display I ordered will arrive soo so I willl test it and if necessay create a dedicated driver.

@Bodmer
Copy link
Owner

Bodmer commented Sep 13, 2018

My display arrived today, it is visually identical to yours. I connected it up to an ESP8266 and used Setup20_ILI9488.h and it worked fine without any changes to the library. I connected it to an ESP32 and used Setup21_ILI9488.h and it worked fine without any changes to the library.

I ran the sketch here that you posted on the ESP8266 with the pins changed to suit and it worked fine. I ran the same sketch on the ESP32 with the pins changed to suit and it ran fine.

I can only conclude that either you have a different display or that your setup is not correct. As the display I have works fine in all my tests I cannot help further. However as you have a setup that works then you have a workable system to experiment with.

@Bodmer Bodmer closed this as completed Sep 13, 2018
@Super169
Copy link
Author

Thanks for your support, and I do appreciate your help.

You can connected it to an ESP32 and used Setup21_ILI9488.h and it worked fine without any changes to the library, that means your library should work with this TFT.

I'm sorry that it has wasted your time and money, and it seems to be my fault in some setting, but unforunately, I have tested again and again today, I still cannot make it work directly using the ILI9288 setting. But if I added the initialization code after tft.init(), and replace the ILI9488_Rotation.h with ILI9486_Rotation.h, everything works fine.

Below is the step I have done to use the dirvre for my TFT, I'm using vscode with PlatformIO.

  1. Create a project in vscode

  2. Delete main.cpp (it will use the example from the library)

  3. Download the library under lib: git clone https://github.com/Bodmer/TFT_eSPI.git

  4. Copy TFT_Meters.ino from examples\480x320\TFT_Meters to src folder

  5. In User_Setup_Select.https

    • Comment #include <User_Setup.h>
    • Uncomment #include <User_Setups/Setup21_ILI9488.h>
  6. In User_Setups\Setup21_ILI9488.h
    Modify the pin setting (line 117 ~ 122) as below

    #define TFT_MISO 19 // (leave TFT SDO disconnected if other SPI devices share MISO)
    #define TFT_MOSI 23
    #define TFT_SCLK 18
    #define TFT_CS 4 // Chip select control pin
    #define TFT_DC 27 // Data Command control pin
    #define TFT_RST 33 // Reset pin (could connect to RST pin)
    #define TFT_BL 32 // LED back-light

If I test the program now, it will have no display. May I know if I have missed anything?

But if I continue with the following steps, it works fine.

  1. In TFT_Drivers folder, replace ILI9488_Rotation.h with ILI9486_Rotation.h

  2. In TFT_Meters.ino (You can find the modified ino here: https://github.com/Super169/images/blob/master/Others/TFT_Meters.fix.ino )

    • Add the initialization function from D1 mini sample
    • Modify the setup() function to call the initializaiton as below
      // tft.init();
      // tft.setRotation(1);
      GPIO_Init();
      TFT_Init();
      pin_init();
      Lcd_Init();
      tft.setRotation(5);

If I test the program again now, it works fine.

SO, the pin assignment should be correct, and I have checked many times, I'm sure they should be connected as below,

VCC    - 3V3
GND    - GND
CS     - GPIO-4
Reset  - GPIO-33
DC     - GPIO-27
MOSI   - GPIO-23
SCK    - GPIO-18
LED    - GPIO-32
MISO   - Not connected

Would you please help to check if I have missed anything in step 1 - 6?

Thanks a lot.

@Super169
Copy link
Author

I found something interesting, and I can solve the problem by setting GPIO-32 to high.

As you said that, you can connected it to an ESP32 and used Setup21_ILI9488.h and it worked fine without any changes to the library. "without any changes" - give me the idea that there may have something missing in the pin connection.

So this time, I do not use my PCB, and try to connect the TFT using your setting, i.e.
CS - GPIO-15 (I use 4)
DC - GPIO-2 (I use 27)
RST - GPIO-4 (I use 33)
BL - GPIO-32

In fact, I have try this before, there has no display also. And this time, I cannot see anything on the monitor at first. But I think that our monitor should be the same, both of them works fine (as I can display with the initialization code). When I put the TFT close to my eye, I found that it has display, but very very dark.....almost the same as the background.

So I try to connect with my setting again, but this time I can't see anything also. I assume that this time is really too dark, so I try to connect the LED to 3V3, it works now.

So I added the following code after tft.init() and remove the connection from LED to 3V3.
pinMode(32, OUTPUT);
digitalWrite(32, HIGH);

It works fine now.

It seems that the initialization code for ILI9488 has not set TFT_BL to HIGH.

May I know if you have connected LED to GPIO-32 or 3V3 directly?

@Super169
Copy link
Author

Super169 commented Sep 14, 2018

After compare the code for ILI9341 and ILI9488, I have to say sorry that I have missed something when using ILI9341. As I just follow the setting in a M5Stack device, which has define M5Stack in code.
In ILI9341_init.h, it has set TFT_BL to HIGH if M5Stack is defined.

#ifdef M5STACK
// Turn on the back-light LED
digitalWrite(TFT_BL, HIGH);
pinMode(TFT_BL, OUTPUT);
#endif

But for other TFT, it will not set TFT_BL to HIGH, and it has not set TFT_BL pin as OUTPUT also. And I didn't aware such difference.

However, as TFT_BL will not set HIGH, does it mean that it will expect LED pin is connecting to 3V3 directly (or any hardware switch), and it's not expect to change the black light in code?

Would it be better to turn on the black light if TFT_BL is defined?
I have added the following code in ILI9488_Init.h:

#if defined (TFT_BL)
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
#endif

So it will use the TFT_BL if defined.

But it seems that TFT_BL is always defined as 32, and it will not be used in the library, isn't it?

@Bodmer
Copy link
Owner

Bodmer commented Sep 14, 2018

Thanks for the update. As you have found the library does not control the back light line as it is simple for the user sketch to do this, so you have come up with the right solution.

Good luck with your project!

@FLYINGSC0T
Copy link

Hi Bodmer, I've been using the library for a ILI9341 display sucessfully with touch and no problems.

Here are my defines:
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 5
#define TFT_DC 2
#define TFT_RST 4
#define TOUCH_CS 21

However, when I try compiling for a ILI9488 display I get a compiler error for the ESP32 - I've changed user setup files accordingly.

Any idea what is going wrong ?

Thanks in advance for any ideas.

Regards.
George

@lloydch
Copy link

lloydch commented May 7, 2019

I had the same problem using the Arduino IDE when I had Compiler warnings in Preferences set to More, setting it to Default the errors change to warnings and it does compile and work.

Lloyd.

@Bodmer
Copy link
Owner

Bodmer commented May 7, 2019

Show an example error please. I use "All" in the preferences for the compiler and get no warnings or errors.

Run the "Read_User_Setup" diagnostic if you can to make sure the compiler is picking up the settings correctly.

@FLYINGSC0T
Copy link

Hi Dancopy,

I have exactly the same ILI9488 display as yours and have got it to work. use the Setup21_ILI9488.h file as follows:

// See SetupX_Template.h for all options available

#define ILI9488_DRIVER

//#define TFT_INVERSION_OFF

#define TFT_MISO 19 // (leave TFT SDO disconnected if other SPI devices share MISO)
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 5 // Chip select control pin
#define TFT_DC 2 // Data Command control pin
#define TFT_RST 4 // Reset pin (could connect to RST pin)

#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen

#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts

#define SMOOTH_FONT

// #define SPI_FREQUENCY 20000000
#define SPI_FREQUENCY 27000000
// #define SPI_FREQUENCY 40000000
// #define SPI_FREQUENCY 80000000

// Optional reduced SPI frequency for reading TFT
#define SPI_READ_FREQUENCY 16000000

#define SPI_TOUCH_FREQUENCY 2500000

If you have other SPI devices connected leave the TFT_MISO GPIO disconnected (GPIO 19 on my configuration). I've found that the ILI9488 display works even if GPIO 19 is not connected. The touch works also.

Remember to define IL9488 driver and Setup21_ILI9488.h in the appropriate User Setup files appropriately even although ILI9488 is defined in the Setup21_ILI9488.h file. Also, to use the latest TFT_eSPI library !!

Good luck and hope this helps and works for you.

@pfisterer
Copy link

I also got it to work with an ESP8266 and ESP32. I'm using platformio - so I defined the configuration in platformio.ini as follows:

ESP8266:

build_flags =
 -I$PROJECT_DIR/include/
 -DUSER_SETUP_LOADED=1
 -DILI9488_DRIVER=1
 -DTFT_MOSI=13
 -DTFT_SCLK=14
 -DTFT_CS=15
 -DTFT_DC=0
 -DTFT_RST=2
 -DLOAD_GLCD=1
 -DSPI_FREQUENCY=27000000

ESP32 (note that it worked only after reducing SPI_FREQUENCY):

build_flags =
 -I$PROJECT_DIR/include/
 -DUSER_SETUP_LOADED=1
 -DILI9488_DRIVER=1
 -DTFT_MOSI=23
 -DTFT_SCLK=18
 -DTFT_CS=15
 -DTFT_DC=2
 -DTFT_RST=4
 -DLOAD_GLCD=1
 -DSPI_FREQUENCY=20000000

Sketch:

#include <Arduino.h>
#include <SPI.h>
#include <TFT_eSPI.h>

void setup() {
 tft.init();
 tft.setRotation(1);  // 0 & 2 Portrait. 1 & 3 landscape
}

void loop() {
 tft.fillScreen(TFT_BLACK);
 delay (1000);
 tft.fillScreen(TFT_RED);
 delay (1000);
}

@Dancopy
Copy link

Dancopy commented Aug 30, 2019

Hi George, thanks for the reply. I already answered your email.
Would you have any sketches ready (Clock or something else) to share with me? I am an apprentice in Arduino and have a hard time with these codes.
Thanks,
Daniel

@videobuff
Copy link

videobuff commented Mar 26, 2020

Hello there
I have the display as described above (now the order package says msp3520 - and points here: http://www.lcdwiki.com/3.5inch_SPI_Module_ILI9488_SKU:MSP3520

The display works very well with an esp8266. I tested all demo'.
But i do not understand how to wire the touch screen.
When i run the read_user_setup, i get the following, which seems to be the same as with the other people.
[code]
Processor = ESP32
Frequency = 240 MHz
Transactions = Yes
Interface = SPI
Display driver = 9341
Display width = 240
Display height = 320

MOSI = D23 (GPIO 23)
MISO = D19 (GPIO 19)
SCK = D18 (GPIO 18)
TFT_CS = D5 (GPIO 5)
TFT_DC = D2 (GPIO 2)
TFT_RST = D4 (GPIO 4)

TOUCH_CS = D21 (GPIO 21)

Font GLCD loaded
Font 2 loaded
Font 4 loaded
Font 6 loaded
Font 7 loaded
Font 8 loaded
Smooth font enabled

Display SPI frequency = 40.0 MHz
Touch SPI frequency = 2.5 MHz
[/code]

But when i run the Test_Touch_Controller sketch, i always see the same values, wherever i press.

Schermafdruk 2020-03-27 00 45 46

So my question is: do I have to connect the other pins from the touch-part as well and to what pins on the esp8266 ? Such as T_IRQ,T_DO,T_DIN and T_CLK?

Hope someone can help me out here....

Erik

@FLYINGSC0T
Copy link

Hi Erik,

With the ILI9488 display this is what works for me:
T_IRQ - Not connected.
T_D0 - Connect to MISO (GPIO 19 on your setup) NOTE: With an ILI9488 do not connect the MISO otherwise the screen may not work - READ THE DOCUMENTATION for this display !!
T_DIN - MOSI connect to MOSI on display (GPIO 23 on your setup).
T_CS - Chip select - has to be unique to control/select each device.
T_CLK - Clock - connect to SCK on display.

Hope this helps.

Regards

@videobuff
Copy link

Hello Flyingscot,
Thanks for the help.
Now the touch controller test script functions.
But the touch controller demo not yet.
Here is the output of the test and I attach te demo sketch which doesnot work yet.
Any comments on that and thanks for thelp alreasy so far.

Erik

15:34:01.381 -> x: 1299 y: 2160 z: 1817
15:34:01.620 -> x: 1296 y: 2192 z: 1800
15:34:01.862 -> x: 1296 y: 2197 z: 1808
15:34:02.130 -> x: 0 y: 3661 z: 20
15:34:02.368 -> x: 0 y: 3664 z: 37
15:34:02.639 -> x: 1491 y: 1407 z: 2157
15:34:02.876 -> x: 1464 y: 1404 z: 2181
15:34:03.115 -> x: 0 y: 3661 z: 12
15:34:03.384 -> x: 0 y: 3663 z: 6
15:34:03.624 -> x: 2606 y: 3085 z: 1611
15:34:03.867 -> x: 2623 y: 3087 z: 1671
15:34:04.139 -> x: 2640 y: 3096 z: 1705
15:34:04.380 -> x: 0 y: 3679 z: 15
15:34:04.618 -> x: 1355 y: 3264 z: 1266
15:34:04.893 -> x: 1391 y: 3262 z: 1290
15:34:05.130 -> x: 1377 y: 3237 z: 1280
15:34:05.370 -> x: 0 y: 3872 z: 38
15:34:05.645 -> x: 0 y: 3695 z: 20
15:34:05.885 -> x: 0 y: 3663 z: 20
15:34:06.124 -> x: 1695 y: 1593 z: 2127
15:34:06.402 -> x: 1752 y: 1571 z: 2082
demo sketch: (comes from the TFT_eSPI-master library by Bodmer)
data.zip

@FLYINGSC0T
Copy link

Hi Erik,

Have you done the following:

  1. Defined the ILI9488 driver in file "User_Setup.h" -
    #define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high) NOTE: ONLY DEFINE ONE DRIVER !!

  2. Included the ILI9488 setup file that you want to use in file "User_Setup_Select.h" -
    #include <User_Setups/"name_of_setup_file.h"> for example the "Setup21_ILI9488.h" should work as in -
    #include <User_Setups/Setup21_ILI9488.h>

  3. Confirm that the GPIO's you are using are the same as those defined in file "Setup21_ILI9488.h". The GPIO's you are using are the default pins for VSPI BTW.

I use the frequencies for the SPI bus as follows (I think they are the defaults). These are also set up in Setup21_ILI9488.h:
#define SPI_FREQUENCY 27000000
// Optional reduced SPI frequency for reading TFT
#define SPI_READ_FREQUENCY 16000000
#define SPI_TOUCH_FREQUENCY 2500000

If everything is set up correctly the demos should work.

Regards.

@videobuff
Copy link

SKU MSP3520 - ILI9488 +Touch working

@FLYINGSC0T
Copy link

I'm pleased you got it working Erik.
Enjoy !!

@ksirirux
Copy link

Thank you..
Work fine.
TTGO v1.7.1 & ILI9488 touchscreen

@Wistiii
Copy link

Wistiii commented Oct 7, 2020

Hi all
the problem with most screens that are compatible with the ESP32 is that once correctly configured and that it displays what you want, it is the quality of the display.
Using such a screen outside is impossible.
They are either too dim, too small, or both at the same time.

Anyone have any idea how to solve this problem?

Thanks

@ Bodmer: thank you for the help you give us all

@Jos1060
Copy link

Jos1060 commented Feb 24, 2022

Hi Flyingscot,
I have similar troubles to run ili9488 touch red display with esp32 dev board. I followed all steps in this discussion:

  1. Downloaded TFT_eSPI.h library
  2. In “User_setup.h” choosed “#define ILI9488_DRIVER”
  3. in file "User_Setup_Select.h" choosed
    “#include <User_Setups/"Setup21_ILI9488.h.h"
  4. Connected 6 wires (LCD: SDO(MISO) 23, SCK 18, SDI(MOSI) 23, D/C 2, RESET 4, CS 15) according to “Setup21_ILI9488.h” file to GPIO´s ports

My LCD doesn’t do anything. Also Doesn’t Light Banklights or whitescreen.

Can you help me to make It Running?
Thank you very much

@FLYINGSC0T
Copy link

Hi Jos1060,
Can you upload a photo of the display you are using to confirm and maybe the contents of your User_Setup.h and User_Setup_Select.h files.
I note that you have connected the MISO and the MOSI pins to GPIO 23!! THIS WILL NOT WORK!!
If it is the same display as the one shown previously in this discussion, DO NOT connect the MISO pin.
You also need to connect the LED pin on the display to 3.3v (recommended) the VCC is connected to 5.0v and GND to GND.

// The default GPIO pins for the ESP32 are as follows:
#define TFT_MISO 19 // For ILI9488 the MISO line should NOT be connected
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 5
#define TFT_DC 2
#define TFT_RST 4

// If you are using the touch screen uncomment the following define below
// and obviously make the correct connections for the touch screen to work
//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen

I will wait for your upload.
Hope this might help.

@dimasw12
Copy link

dimasw12 commented Jul 1, 2022

how about this?
image

@dimasw12
Copy link

dimasw12 commented Jul 1, 2022

i use ili9488, on esp32 but appear error like that. anyone can help me?

@Bodmer
Copy link
Owner

Bodmer commented Jul 1, 2022

Define a touch pin in the setup file. See example setups files.

@Jos1060
Copy link

Jos1060 commented Jul 1, 2022 via email

@dimasw12
Copy link

dimasw12 commented Jul 1, 2022

thankyouuu, but i still have a error after that ,please help me

image

@Bodmer
Copy link
Owner

Bodmer commented Jul 1, 2022

You need to use a separate touch library. TFT_eSPI does not include touch functions for parallel interface displays.

@DoctorDeatch
Copy link

DoctorDeatch commented Aug 9, 2022

IMG_20220809_131051
Greetings, I can't launch ili9486 ESP8266 in any way :(
I've already redone it according to all the instructions here. still a white screen

platformio.ini
build_flags =
-DUSER_SETUP_LOADED=1
-DILI9488_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=14
-DTFT_CS=15
-DTFT_DC=0
-DTFT_RST=2
-DLOAD_GLCD=1
-DSPI_FREQUENCY=27000000

User_Setup_Select.h
#include <User_Setups/Setup20_ILI9488.h> // Setup file for ESP8266 and ILI9488 SPI bus TFT

User_Setup.h
#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
#define TFT_CS PIN_D8 // Chip select control pin D8
#define TFT_DC PIN_D3 // Data Command control pin
#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
#define SMOOTH_FONT

@FLYINGSC0T
Copy link

Hi DoctorDeatch. My first observations from the photo is that the SDI (MOSI) and SCK pins on the display are not connected. It's NEVER going to work without these very important connections!! Can you upload a photo of the other side of the MCU and maybe the links to where you sourced the 8266 NodeMCU and the TFT display.

@FLYINGSC0T
Copy link

I'm pleased you got your display working. Regarding your problem with SPIFFS, this is not the forum to seek advice on that subject. However, you may have omitted to include the file system libraries in your program but I suggest you search the internet to find the solution to your problem. Regards.

@DoctorDeatch
Copy link

Hello Flyingscot, Thanks for the help. Now the touch controller test script functions. But the touch controller demo not yet. Here is the output of the test and I attach te demo sketch which doesnot work yet. Any comments on that and thanks for thelp alreasy so far.

Erik

15:34:01.381 -> x: 1299 y: 2160 z: 1817 15:34:01.620 -> x: 1296 y: 2192 z: 1800 15:34:01.862 -> x: 1296 y: 2197 z: 1808 15:34:02.130 -> x: 0 y: 3661 z: 20 15:34:02.368 -> x: 0 y: 3664 z: 37 15:34:02.639 -> x: 1491 y: 1407 z: 2157 15:34:02.876 -> x: 1464 y: 1404 z: 2181 15:34:03.115 -> x: 0 y: 3661 z: 12 15:34:03.384 -> x: 0 y: 3663 z: 6 15:34:03.624 -> x: 2606 y: 3085 z: 1611 15:34:03.867 -> x: 2623 y: 3087 z: 1671 15:34:04.139 -> x: 2640 y: 3096 z: 1705 15:34:04.380 -> x: 0 y: 3679 z: 15 15:34:04.618 -> x: 1355 y: 3264 z: 1266 15:34:04.893 -> x: 1391 y: 3262 z: 1290 15:34:05.130 -> x: 1377 y: 3237 z: 1280 15:34:05.370 -> x: 0 y: 3872 z: 38 15:34:05.645 -> x: 0 y: 3695 z: 20 15:34:05.885 -> x: 0 y: 3663 z: 20 15:34:06.124 -> x: 1695 y: 1593 z: 2127 15:34:06.402 -> x: 1752 y: 1571 z: 2082 demo sketch: (comes from the TFT_eSPI-master library by Bodmer) data.zip

Colleagues, good afternoon. faced with the same problem
, tell me how to solve it?
I use PlatformIO for compilation
TFT_eSPI 2.4.74
GFX Library for Arduino 1.2.6

I get the following values without touching:
x: 0 y: 3402 z: 38
x: 0 y: 3354 z: 41
when touching:
x: 1989 y: 1907 z: 1755
x: 1999 y: 1906 z: 1816
x: 1996 y: 1908 z: 1831
x: 1833 y: 1908 z: 1859

how to fix this situation?

@Robmalus
Copy link

Help. Pins from TFT to ESP8266 pins: VCC-3.3V, GND-GND, CS-D8(GPIO15), RST-D4(GPIO02), D/C-D3(GPIO00), SDI-D7(GPIO13),SCK-D5( GPIO14), BL-3.3V, TCS-D2(GPIO04). The personal sketch works, text appears on the screen and the incoming temperature date from another ESP8266, but as soon as I load the TFT_eSPI-Touch_Controller_Demo sketch for ESP8266, it does not work. The screen does not respond to touch. What is the problem, what am I missing?
tft

@Bodmer
Copy link
Owner

Bodmer commented Nov 20, 2022

Have you connected the touch controller pins to the SPI bus? Example:

T_IRQ - Not connected.
T_D0 - Connect to processor MISO (D6) NOTE: With an ILI9488 do NOT connect the MISO to the TFT SDO pin
T_DIN - Connect to processor MOSI (D7) also connects to display SDI
T_CS - Chip select - has to be unique GPIO - TOUCH_CS defined in setup file as D2?
T_CLK - Clock - connect to processor SCK pin (d5) (also connects to SCK on display

@DoctorDeatch
Copy link

DoctorDeatch commented Nov 21, 2022

Primer
-D USER_SETUP_LOADED=1
-D TOUCH_SETUP_LOADED=1
-D ILI9488_DRIVER=1
-D TFT_MOSI=14
-D TFT_MISO=1
-D TFT_SCLK=12
-D TFT_CS=2
-D TFT_DC=15
-D TFT_RST=4
-D LOAD_GLCD=1
-D LOAD_FONT2=1
-D LOAD_FONT4=1
-D LOAD_FONT6=1
-D LOAD_FONT8=1
-D TOUCH_CS=3
-D SPI_FREQUENCY=27000000
-D SPI_READ_FREQUENCY=16000000
-D SPI_TOUCH_FREQUENCY=2500000

@Robmalus
Copy link

Robmalus commented Nov 21, 2022 via email

@DoctorDeatch
Copy link

DoctorDeatch commented Nov 21, 2022

You connected on the TFT 6-12 7-10 ?
it is also necessary to uncomment the frequency of the spi
#difline SPI_FREQUENCY 27000000
#difline SPI_READ_FREQUENCY 16000000
#difline SPI_TOUCH_FREQUENCY 2500000

also , you have rst has two values at the same time , which should not be
commented out #difline TFT_RST -1

I'm also not sure that PIN_D# can be specified here, I specified GPIO (just a number)

@Bodmer
Copy link
Owner

Bodmer commented Nov 21, 2022

Mmmmm Отправлено из Mail.ru !

Repository owner locked and limited conversation to collaborators Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests