White screen on LCD TFT

Hello Everyone. I continuously get a white screen when trying any sketch uploaded using a Elegoo Mega 2560 R3 Board with a 3.5" TFT LCD screen.

I have tried the UTFT library and the TFT_eSPI library. I can see in the Serial Monitor that the sketch is running but still a white screen, no matter what sketch. If I try an example sketch from Arduino I don't even get output in the Serial Monitor.
I tried a smaller 2.8" TFT and get the same white screen. There is ILI9488 and ILI9486 on the back of the 3.5" LCD that I have tried both and I just don't know what I am missing. Anyone have some ideas?


Have you tried the MCUFRIEND_kbv library?

1 Like

I just came across this library in another chat. All I can do is try! Have you had success with this library?

It's my go to library for parallel interface shield displays.

1 Like

Im just headed back to the shop to play with this. Do you think that library will work if it os not a shield built by MCUFRIEND? Perhaps a dumb question

I'd be surprised if it didn't. At this point, read it as "a library for shield displays that conform to the MCUFRIEND pinout". I have a 3.5" ILI9486 shield that looks identical to yours and I've had that working on an Uno R3, Uno R4 (with some mods that are available on this forum), Mega and even a Pico.

1 Like

If it has a SD card slot and no ICSP pins, the SD won't work without pin bending. It presumes SPI on D11-13.
Just FYI.

1 Like

Hi @cryptodeity ,

there is (was) an issue with white screen and TFT touchdisplays as some of them use the same pins for the display and the touchscreen function.

Do you find lines like this in the code you used?

#define YP A2  
#define XM A3 
#define YM 8   
#define XP 9  

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
MCUFRIEND_kbv tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

The TouchScreen evaluates the resistance measured using XP, YP and XM, YM.

The library "TouchScreen.h" sets XM and YP to INPUT mode everytime getPoint() is called but does not restore the previous state. Now when the drawing functions use these pins, they are no longer in OUTPUT mode ...

This is a snippet from the lib:


// Source: https://github.com/adafruit/Adafruit_TouchScreen/blob/master/TouchScreen.cpp
TSPoint TouchScreen::getPoint(void) {
  int x, y, z;
  int samples[NUMSAMPLES];
  uint8_t i, valid;

  valid = 1;

  pinMode(_yp, INPUT);
  pinMode(_ym, INPUT);
  pinMode(_xp, OUTPUT);
  pinMode(_xm, OUTPUT);

#if defined(USE_FAST_PINIO)
  *xp_port |= xp_pin;
  *xm_port &= ~xm_pin;
#else
  digitalWrite(_xp, HIGH);
  digitalWrite(_xm, LOW);
#endif

(There are actually several places in this function where INPUT/OUTPUT mode of the four pins are changed ... Finally XM and YP seem to stay in INPUT mode).

You may try this

   TSPoint p = ts.getPoint();
    pinMode(YP, OUTPUT);
    pinMode(XM, OUTPUT);

after the call of getPoint() to reset the pin modes ...

Good luck!
ec2021

1 Like

Hey my friend, it worked great to initialize the screen with my first test using an example from the MCUFRIEND_kbv library called graphictest_kbv. I will have to test our aketch now and hopefully we can at least get past the white screen. I feel we will. Cheers I will let e everyone know.

Has anyone experienced a white screen on an LCD TFT with Arduino? I've already checked the wiring, power supply, and code, but the screen still stays white. Any suggestions or troubleshooting tips would be really helpful.

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