XIAO Library Issue for TFT_eSIP with Arduino

Hi Seeed,

I was trying to make XIAO working with my TFT display ZJY-IPS130 which is a display using ST7789 controller. But the all demo code will cause XIAO not readable from PC and need a reset to bring it back. In Seeed_Arduino_LCD library it states you are using TFT_eSPI from but it seems some bug there to cause XIAO fault. Could you update the SPI configs for that library?

PS: SPI is no problem to use with SPI.h directly.

Regards

HI,
Have you configured Seeed_Arduino_LCD to adapt it to your hardware?

Yes, I configed as:

// For seeed samd21

#define HASSPI 0

#define SPICOM SPI

#define TFT_CS 5

#define TFT_DC 6

#define TFT_RST 3

and it has no problem to compile. Similar code has been used with ESP32 and it working fine.

1 Like

try #define HASSPI, and connect to the correct pin.

#define HASSPI 1
#define SPICOM SPI
#define TFT_CS   5
#define TFT_DC   6
#define TFT_RST  -1    // Set TFT_RST to -1 if the display RESET is connected to RST or 3.3V
// Only define one driver, the other ones must be commented out
#define ILI9341_DRIVER
//#define ST7735_DRIVER      // Define additional parameters below for this display
//#define ILI9163_DRIVER     // Define additional parameters below for this display
//#define S6D02A1_DRIVER
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
//#define HX8357D_DRIVER
//#define ILI9481_DRIVER
//#define ILI9486_DRIVER
//#define ILI9488_DRIVER     // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
//#define ST7789_DRIVER      // Full configuration option, define additional parameters below for this display
//#define ST7789_2_DRIVER    // Minimal configuration option, define additional parameters below for this display
//#define R61581_DRIVER

// Some displays support SPI reads via the MISO pin, other displays have a single
// bi-directional SDA pin and the library will try to read this via the MOSI line.
// To use the SDA line for reading data from the TFT uncomment the following line:

// #define TFT_SDA_READ      // This option is for ESP32 ONLY, tested with ST7789 display only

//


I am trying to get a XIAO to TFT circuit working. I have attached the schematic. I have modified the User_Setup,h
// Only define one driver, the other ones must be commented out
//#define ILI9341_DRIVER
//#define ST7735_DRIVER // Define additional parameters below for this display
//#define ILI9163_DRIVER // Define additional parameters below for this display
//#define S6D02A1_DRIVER
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
//#define HX8357D_DRIVER
//#define ILI9481_DRIVER
//#define ILI9486_DRIVER
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high
#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
//#define R61581_DRIVER


// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
// #define TFT_WIDTH 80
// #define TFT_WIDTH 128
#define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
// #define TFT_HEIGHT 160
// #define TFT_HEIGHT 128
#define TFT_HEIGHT 240 // ST7789 240 x 240
// #define TFT_HEIGHT 320 // ST7789 240 x 320


// For seeed samd21
#define HASSPI 1
#define SPICOM SPI
//#define TFT_CS 5
#define TFT_DC 4
#define TFT_RST 5 // Set TFT_RST to -1 if the display RESET is connected to RST or 3.3V
Anything I try ends up with a blank screen. Any suggestions or your own circuit and code?
Thanks,
Bill

Where can I go and see if this was ever resolved. If it was it may seem obvious to you but it’s not for me. I’ve been struggling with this for a week.

1.Why do you comment out CS?
You need to connect LCD to SPI, then connect CS and DC to any pin and specify it, and then set RST to - 1. Remember to connect BL to 3.3V, if you don’t need to control it, otherwise you can connect to any pin and pull it up

what about a backlight pin?

backlight pin is generally connected to VCC power

Bill did you ever resolve this? I am planning to go this route, but wanted to make sure
it was doable.

I believe there are two ways around this. The first is to add a CS line to the display:

(I tried this and made some comments.
The second is a software work-around that also worked but required changing some of the TFT_sPI settings:

These photos are showing a Pi Pico but the XIAO should work also. It has been a while since I worked on this, but I think this is correct information.

I am new to software. I am trying to connect this same display. But for all program result as blank display. Please guide me or send any video link with xiao ble and TFT 240X240

Did you ever find out how to get the TFT to work with the BLE? I’m having the exact same problem. Works fine with nano.