-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comments
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. |
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. |
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 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. |
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. |
Yes, you are right. Without connecting TFT's SDO, I can use the touch function. |
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. |
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 |
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! |
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)
|
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 Then in your sketch, in setup() after tft.init() add these lines to switch the display to 18 bit:
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. |
Thanks a lot. 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. |
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. 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. |
Just try to port the code to ESP32 by changing the pin setting for SPI, it works with my pin assignment: Need to compare the initialization code between the sample and yours. |
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. |
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. |
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. |
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.
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.
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,
Would you please help to check if I have missed anything in step 1 - 6? Thanks a lot. |
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. 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. 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? |
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.
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?
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? |
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! |
Hi Bodmer, I've been using the library for a ILI9341 display sucessfully with touch and no problems. Here are my defines: 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. |
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. |
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. |
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 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 SMOOTH_FONT // #define SPI_FREQUENCY 20000000 // Optional reduced SPI frequency for reading TFT #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. |
I also got it to work with an ESP8266 and ESP32. I'm using platformio - so I defined the configuration in 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);
} |
Hi George, thanks for the reply. I already answered your email. |
Hello there The display works very well with an esp8266. I tested all demo'. MOSI = D23 (GPIO 23) TOUCH_CS = D21 (GPIO 21) Font GLCD loaded Display SPI frequency = 40.0 MHz But when i run the Test_Touch_Controller sketch, i always see the same values, wherever i press. 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 |
Hi Erik, With the ILI9488 display this is what works for me: Hope this helps. Regards |
Hello Flyingscot, Erik 15:34:01.381 -> x: 1299 y: 2160 z: 1817 |
Hi Erik, Have you done the following:
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: If everything is set up correctly the demos should work. Regards. |
I'm pleased you got it working Erik. |
Thank you.. |
Hi all Anyone have any idea how to solve this problem? Thanks @ Bodmer: thank you for the help you give us all |
Hi Flyingscot,
My LCD doesn’t do anything. Also Doesn’t Light Banklights or whitescreen. Can you help me to make It Running? |
Hi Jos1060, // The default GPIO pins for the ESP32 are as follows: // If you are using the touch screen uncomment the following define below I will wait for your upload. |
i use ili9488, on esp32 but appear error like that. anyone can help me? |
Define a touch pin in the setup file. See example setups files. |
Hi, everything is working correct Now.
Thank you
Jozef
Dňa pi 1. 7. 2022 o 13:15 Bodmer ***@***.***> napísala(a):
… Define a touch pin in the setup file. See example setups files.
—
Reply to this email directly, view it on GitHub
<#187 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AX5SJXSULYDQLVZQIVTYLJLVR3HMNANCNFSM4FPEDI4A>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
You need to use a separate touch library. TFT_eSPI does not include touch functions for parallel interface displays. |
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. |
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. |
Colleagues, good afternoon. faced with the same problem I get the following values without touching: how to fix this situation? |
Have you connected the touch controller pins to the SPI bus? Example: T_IRQ - Not connected. |
Primer |
Still doesn't work.
--
Отправлено из Mail.ru для Android воскресенье, 20 ноября 2022г., 23:49 +02:00 от Bodmer ***@***.*** :
…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
—
Reply to this email directly, view it on GitHub , or unsubscribe .
You are receiving this because you commented. Message ID: @ github . com>
|
You connected on the TFT 6-12 7-10 ? also , you have rst has two values at the same time , which should not be I'm also not sure that PIN_D# can be specified here, I specified GPIO (just a number) |
Mmmmm Отправлено из Mail.ru ! |
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.
The text was updated successfully, but these errors were encountered: