Esp32 with 8 bit parallel display ili9341 and TFT_eSPI

i am trying to connect an 8 bit parallel display to my esp32 with TFT_eSPI but for some reason it dosnt work

this is the setup i use:

#include <User_Setups/Setup14_ILI9341_Parallel.h>

the inside of the folder is:

#define TFT_CS   33  // Chip select control pin
#define TFT_DC   15  // Data Command control pin - must use a pin in the range 0-31
#define TFT_RST  32  // Reset pin

#define TFT_WR    4  // Write strobe control pin - must use a pin in the range 0-31
#define TFT_RD    2

#define TFT_D0   12  // Must use pins in the range 0-31 for the data bus
#define TFT_D1   13  // so a single register write sets/clears all bits
#define TFT_D2   26
#define TFT_D3   25
#define TFT_D4   17
#define TFT_D5   16
#define TFT_D6   27
#define TFT_D7   14

and i pluged the pins exactly like here

this is the code i used:

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

TFT_eSPI tft = TFT_eSPI();

void setup() {
Serial.begin(115200);
  delay(1000);
  Serial.println("Starting...");
  tft.init();                      // Initialize TFT
  tft.setRotation(1);
  tft.fillScreen(TFT_BLUE);
  Serial.println(tft.readcommand8(0x04), HEX);  

}

void loop() {}

but the screen stays white and the output is this:

Starting...

0

at start i thought its maybe a faulty display but i checked it on an arduino uno and it worked(with a different library)

this is the link to the display:

https://he.aliexpress.com/item/32992884961.html?spm=a2g0o.cart.0.0.661c5c6exVyS4v&mp=1&pdp_npi=5%40dis!ILS!ILS%2024.97!ILS%2024.97!!!!!%402140c1c317453407142152340ee6ef!66961700451!ct!IL!-1!!1!0&gatewayAdapt=glo2isr

if someone knows how to make this work please help me im stuck on this for hours

after i posted my question i spent my day checking this problem and i found the answer, so for everyone that have the same problem and reads this(and i know there are because i myself checked here for solutions) i think i found (for me atleast)the problem that as much as i know happens with only parallel displays

if your code compiles, as of all my check(that are not many so maybe its only me) you probably didnt do one of the following:

  1. change the user_setup.h file or created a similar file with all the pins your using(if creat need to include in user_setup_setect.h)
  2. declare the 8 bit parallel and your display driver in your setup file(for parallel: #define TFT_PARALLEL_8_BIT or this #define ESP32_PARALLEL)
  3. wires are not correct or you used them in important pins for you board modul so either you getting erorrs on that or the screen just stays white

if you checked all above and your screen is still getting errors this is the kind of error you probably see:

Error message:
*In file included from c:\Users\Administrator\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:24:*
*c:\Users\Administrator\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32.c: In member function 'uint8_t TFT_eSPI::readByte()':*
*c:\Users\Administrator\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32.c:113:9: error: 'gpio_input_get' was not declared in this scope; did you mean 'gpio_num_t'?*
*  113 |   reg = gpio_input_get(); // Read three times to allow for bus access time*
*      |         ^~~~~~~~~~~~~~*
*      |         gpio_num_t*

*exit status 1*

*Compilation error: exit status 1*

what i found out is that the function: gpio_input_get(); dosnt need to be there so what you need to do is to go to that file and erase every line with that function, save the file and then run one of the example codes after that it should work

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.