Ghosting issue on 3.5″ ILI9486 TFT with Arduino Mega 2560 (MCUFRIEND_kbv)

Hi everyone,
I’m working on a project using an Arduino Mega 2560 with a 3.5″ TFT shield (ILI9486 controller, resistive touch). The display initializes correctly, and touch calibration works, but I’m consistently getting ghosting / overlapping text when updating only parts of the screen.
What I’ve tried:

  • Using tft.fillRect() to clear areas before redraw
  • Using setTextColor(WHITE, BLACK) with background overwrite
  • Debouncing touch inputs
  • Even doing full-page redraws with fillScreen()

Despite all this, the screen still leaves behind traces of old numbers when updating a pressure value (e.g., -125 → -120 mmHg shows remnants of the 5).

Details:

  • Display ID = 0x9486 (MCUFRIEND_kbv library)
  • Arduino Mega 2560
  • Library tested: MCUFRIEND_kbv 3.0+
  • Touch calibration confirmed correct
  • Ghosting only happens after touch events, not on the splash screen

Question:

  • Has anyone else faced this issue with ILI9486 + Mega + MCUFRIEND?
  • Is it a library init problem (pixel format not set to 16-bit RGB565)?
  • Or is the Mega too slow for clean partial redraws on ILI9486 shields?
  • Would UTFT or another library fix this?

Any suggestions or patches would be really appreciated!

Show us a minimal sketch that demonstrates the problem, please.

Are you using a font other than the default? I had a similar problem with any font besides default.

As @SurferTim mentioned, the background color only works for the default font. All other fonts are transparent, and will leave the previous character on the screen. There are several techniques for clearing the screen, generally either draw a box over the previous text using the background color, or save the previous text and write it to the screen using the background color before writing the new text.