Will MCUFRIEND_kbv work with ER-TFTM035-6 board wired for SPI 4-wire.

I have been using MCUFRIEND with MEGA board and a 3.5 inch TFT from MCUFRIEND. Everything is working fine. But it was slow. So I moved to a ESP32 R32 Arduino compatible board. It took awhile bit got it to work fine. Screen updates much faster.

Now I have just changed the TFT display board to free up some pins. I'm now using ER-TFTM035-6 board wired for SPI 4-wire.

Does the MCUFRIEND_kbv library support the SPI 4-wire display I now have? Or will I need to use a different library?

If I can use MCUFRIEND_kbv where do I set the MOSI, MISO, etc pins?

Thanks for your help.

No. MCUFRIEND_kbv only supports 8080-8 and 8080-16 parallel interfaces.

I suggest that you configure Bodmer's TFT_eSPI library for ILI9486. His library is designed for ESP8266 and ESP32.

Run his examples.

If you have problems with colours, directions, ... make notes. i.e. which example, what problem

Then report back to this Forum. Bodmer is often here. I possess a ER-TFTM035-6 (I think). So I can probably help too.


I have the display part running fine. The touch screen seems to be another issue.

I have tried running the Touch_controller_demo example. Although the display part is working the touch part is not.

On the ER-TFTM035-6 board the LCD SPI and Touch SPI are on different pins. It appears Bodmer's TFT_eSPI only support 1 SPI for both LCD and Touch. So I have to jumped the LCD SPI and the Touch SPI wires together. I have wired ER-TFTM035-6 pins LCD Serial Clock to Touch Serial Clock (pins 24-33), LCD SDI to Touch SDI (pins 27-34) and LCD SDO to Touch SDO (pins 28-33). This should allow one SPI to control both LCD and Touch

Also define TOUCH_CS.

But this does not work? Any ideas?


The ILI9488 is badly behaved on MISO. It does not 3-state properly. Insert a 10k series resistor from ILI9488’s SDO to MISO.

I presume that you have a resistive Touch controller. A Capacitive Touch uses I2C. But obviously you still have the problem with any other SPI devices on the bus.

The other solution is to disconnect ILI9488 SDO pin completely and use SDI as a bidirectional “SDA” pin.


Yes I have the resistive touch pad. Thanks for the info.

What would I need to change in the hardware and software to disconnect ILI9488 SDO pin completely and use SDI as a bidirectional “SDA” pin?


You write to a register. It is my bedtime. I can't remember the register name. The ESP8266 is capable of reading a bidirectional SDA (I think).

Bodmer does nor support bidirectional (I think)

Not many programs actually read ID, GRAM or registers. So most examples will run quite happily without you changing any library software. Just disconnect SDO pin from MISO.

The "RPi shift register" abortions are not capable of reading at all.


David thanks for the quick answers! Very much appreciated.

It seems like none of the hardware I have purchased will just work. The boards need to be modified and the software changed to get things working.

If you needed a 3.5 tft display with a touch screen and esp32 what hardware would you buy?



The only change you need to make to your original setup is to disconnect the TFT SDO pin from the ESP32.

You only need to add an inline resistor between the ESP32 and TFT SDO pin (as suggested by David) if you wish to read the pixel colours back from the display.

Setup 21 is the setup I use for the ER-TFTM035-6 board, but note line 6 of that file. Also note that I do NOT have a touch screen fitted to my display, so you would need to add the required chip select pin to the setup file. e.g.

#define TOUCH_CS 21     // Chip select pin (T_CS) of touch screen