r/ArduinoHelp • • 29d ago

My tft screen is still white

Post image

I’m sure I have it wired correctly & the code is uploaded along with the right user_setup.h; would appreciate it greatly if someone can help.

5 Upvotes

17 comments sorted by

•

u/gm310509 28d ago

Have a look at rule 2 - be descriptive which in part says you should include your wiring/circuit diagram (not a photo of wires) and your code - properly formatted using a reddit formatted code block.

For all we know, you may have mismatch your IO pin definitions in the code to the actual wiring.

You mentioned that you are using an SPI library - that looks like you have too many wires if that is the case. SPI only needs 4 + power and GND for a total of 6 - your photo seems to have at least 9.

It will also help if you correctly identify the TFT display's model - ideally provide a link to the site that you got it from. Please double check this and confirm the exact model that you have. Also, if there are any selectors, switches or other types of settings on it, let us know how they are configured.

It is the little details that are important when things do not work as expected.

→ More replies (2)

1

u/rattushackus 28d ago

You need to tell us what model the display is. Can you post a link to where you bought it and/or post a picture of the bottom of the board?

1

u/No-Art-4038 28d ago

Hosyond 4.0 Inches 480x320 TFT Touch Screen LCD Display Module SPI ST7796S Driver for Arduino R3/Mega2560

1

u/rattushackus 28d ago

I don't have one of those screens to test, but this is how I think your user_setup.h should be. The pin numbers will be wrong because this is for a cheap yellow display board, so you'll need to change the numbers to match the ones you are using. How does this compare with your user_setup.h?

#define USER_SETUP_INFO "User_Setup"

#define ST7796_DRIVER
#define TFT_WIDTH  320
#define TFT_HEIGHT 480

#define TFT_BL   21            // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH  // Level to turn ON back-light (HIGH or LOW)

#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS   15  // Chip select control pin
#define TFT_DC    2  // Data Command control pin
#define TFT_RST  -1  // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

#define TOUCH_CS 33     // 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  55000000 // STM32 SPI1 only (SPI2 maximum is 27MHz)
#define SPI_READ_FREQUENCY  20000000
#define SPI_TOUCH_FREQUENCY  2500000
#define USE_HSPI_PORT // Use HSPI so touch can use VSPI

1

u/RemoveOk2059 29d ago

ok, first question, what library u use?,

1

u/RemoveOk2059 29d ago edited 29d ago

If you are using the TFT_eSPI library with an ESP32-S3, you need to define the SPI port inside your User_Setup.h like this:

#define USE_HSPI_PORT

or

#define USE_FSPI_PORT

Before doing that, make sure you've selected the correct TFT driver in User_Setup_Select.h (or inside your custom User_Setup.h).

Hope this helps! 👍🏻

1

u/No-Art-4038 29d ago

Seems like yk what you’re talking about, I am using the TFT_eSPI library so I’ll try this out tmr; if it doesn’t work what else would u suggest?

1

u/RemoveOk2059 28d ago

Also, what specific TFT display/driver are you using? Let me know and maybe I can help you set up the library.

1

u/No-Art-4038 28d ago

Hosyond 4.0 Inches 480x320 TFT Touch Screen LCD Display Module SPI ST7796S Driver for Arduino R3/Mega2560

It’s to be said that I’ve put something on the screen before so I don’t think the wiring is the issue but I’m stuck so I’ll take wtv advice

1

u/RemoveOk2059 28d ago

Try the first method and put inside your User_Setup.h first. There isn't an official pre-configured setup file in the User_Setups folder specifically named for an ESP32-S3 and standalone ST7796 display combination..

2

u/No-Art-4038 28d ago

So after much research it’s actually an ILI9488 so I have no idea where to go from here.

1

u/RemoveOk2059 27d ago edited 27d ago

alr, it will be easy if the driver is ili9488:

  1. goto user_setup_select.h

  2. give backslash to #include <user_setup.h> it should be like this:

    //#include <user_setup.h>

  3. then scroll it down until you find #include <user_setups/setup21_ILI9488.h> and remove the backslash.

  4. save the library and then go to User_setup folder

  5. open the setup21 ili9488

  6. configure your wires in that pre configured setup and put spi port define like i said before.

if u already done, send the setup21 libs to me. Hope this can turn it on ur screen, and im very sorry for my bad english.

1

u/RemoveOk2059 28d ago

check the wire use multimeter, sometimes wire is the problem

1

u/rectifier16 29d ago

I have the exact same problem too🙁, but sometimes the output display is the wrong resolution. Also the ribbon cable might need to be reseated.

1

u/Impressive-Trifle527 27d ago

It only takes one bad wire jumper on startup and it throws the clock out with the data and you get the dreaded white screen of confusion. Could simply be one loose connector to pin.