A Tale of two Screens

At first I thought I had been sent a batch of faulty ILI9341 displays. They looked identical to the pile of others I’ve been using, but on first use were only writing to the top 2/3rds of the screen.

These are 2.4inch displays that feature SDCard, touch interface and have given me great service.

At close inspection there’s not much to distinguish the screens, but after some detective work, it appears that the new boards (the lower one in this picture) are not in fact as advertised ILI9341 !

If you find yourself in this situation, this might help. I found that they respond as ST7789 screens, and as such they perform very well.

define ST7789_DRIVER instead of
define ILI9341_DRIVER

In practical terms here are the relevant settings for using the TFT_eSPI library.
Of course the pin numbers are relevant to my uses with ESP32 lolin, your use may differ.

Note that the ST7789 screen also needed :
define TFT_INVERSION_OFF
and
define TFT_RGB_ORDER TFT_BGR
Otherwise the User_setup.h settings will be the same.

// ILI9341 Screen
#define ILI9341_DRIVER      
#define TFT_CS   27  
#define TFT_DC   14  
#define TFT_RST  26    
#define TOUCH_CS 15
// ST7798 "ROHS" screen
#define ST7789_DRIVER
// If colours are inverted (white shows as black) then uncomment one of the next
// #define TFT_INVERSION_ON
#define TFT_INVERSION_OFF

// Try ONE option at a time to find the correct colour order for your display
// #define TFT_RGB_ORDER TFT_RGB  // Colour order Red-Green-Blue
#define TFT_RGB_ORDER TFT_BGR  // Colour order Blue-Green-Red
#define TFT_CS   27 
#define TFT_DC   14 
#define TFT_RST  26   
#define TOUCH_CS 15

I hope this saves a few more from going into the bin!