Experimental library for ESP32 and 8 bit parallel displays, e.g. mcufriend style

The ESP32 boards available have sufficient pins to drive 8 bit parallel based TFT displays.

Edit: The TFT_eSPar repository has been deleted. The TFT_eSPI library here has now been updated and incorporates the parallel display support.

The User_Setup.h file, as written, supports an UNO style ESP32 and ILI9481 480x320 8 bit parallel display.

The ESP32 board I have been using for testing has the following pinout:

UNO style boards with a Wemos R32(ESP32) label are also available at low cost with the same pin-out.

Unfortunately the typical UNO/mcufriend TFT display board maps LCD_RD, LCD_CS and LCD_RST signals to the ESP32 pins 35, 34 and 36 which are input only. To solve this I linked in the 3 spare pins IO15, IO33 and IO32 by adding wires to the bottom of the board as follows:

IO15 wired to IO35
IO33 wired to IO34
IO32 wired to IO36

Performance is quite good, the Adafruit graphics test completes in ~2s and the UTFT test in ~0.8s, the screen clears in ~40ms.

Here is a graphic of the modification in the above post to make those LCD control pins output.

Ah-ha. You have used the same hardware mod as I use.

It will be good to try some of your extra text drawing methods. MCUFRIEND_kbv only provides the regular Adafruit_GFX methods.

Regarding Adafruit Tests. I can achieve 0.8 seconds for a 240x320 display when I use an overclocked Xmega. But this is pretty much the limit for most TFT controllers.
2 seconds on a 320x480 is very good result.

Parallel displays are quite common (and cheap). SPI displays always seem a better use of resources.
Unfortunately very few SPI modules are available on Ebay / AliExpress. Mostly 240x320 ILI9341.


Hi David,

I've merged the 8 bit parallel support into my local copy the TFT_eSPI library for testing prior to updating Github. I have experimented further, added 8 bit parallel code to read the TFT and that is working well.

graphicstest indeed reports 0.79s with an ILI9341 display, this is limited by the ESP GPIO bit update period because the ESP32 can only change pin state every ~50ns when bit bashing.


It is fairly academic when you get to those speeds. Does anyone care if you do Adafruit Tests in 0.5s or 0.8s ?
Running a Uno shield on a Mega2560 has to mangle the data bus on random GPIO pins. The same Adafruit Tests take 18 seconds or so. The ESP32 has to do similar mangling but achieves it much quicker.

It would be so much nicer to run proper SPI displays on the ESP32 (or ESP8266)
The RPi shift register kludge of a parallel display is unpleasant.

I have not got around to playing with anti-aliasing grayscales yet. I need to summon some enthusiasm.


Edit. I knew that I had a question for you. Do you have an HX8357-A datasheet? or an HX8357-C datasheet newer than April 2011?

Agreed, the speed does become acedemic and the law of diminishing returns apply. I do want to get sprites running fast though for my projects so during the update I couldn't resist streamlining the rendering!

The TFT read seems quite fast too (~1Mpixel/s) and makes smooth software scrolls possible. I have made a sliding block puzzle example for fun that slides small image blocks smoothly but I have not tried to get the resistance based touch screen working yet.

I am not a fan of the RPi serial TFT designs but serial 480x320 screens are scarce and tend to be costly, hence the move to the UNO style ILI9481 for the ESP32.

As pointed out UNO displays are readily available and cheap.

Edit: P.S I only have old copies of the data sheets straight off the web ;-(

I have just updated the TFT_eSPar test library with all the sprite and smooth font code, essentially this is a test copy of the new TFT_eSPI library.

Working well on an ILI9488 here. Excellent job.


Thanks for the feedback. Did you add another driver for the ILI9488 or use the existing ILI9481 driver?

I ask because normally a slightly different set of initialisation commands are needed for the ILI9488 TFT.

I created a new set of init, rotation & definition files specifically for the ili9488 and added references to them.

I have added the ILI9488 support and modified the TFT read functions to support that board.

The Adafruit HX8357D board has been added to the supported drivers but I do not have one of those boards so am unable to test... report back if you have tried that display in SPI mode with the TFT_eSPI library.

I have modified the original post as the experimental repository has now been deleted. The parallel support has been added into the TFT_eSPI master library which now supports both Serial and Parallel Interface displays. The parallel displays must be 8 bits and the ESP32 must be used.

The library still supports SPI displays on both the ESP8266 and ESP32!

I didn't find:


on GitHub in the latest TFT_eSPI release. It's possibly me being stupid.

Is it possible also release a HX8357D parallel user setup as well and I will test that?


Nope. it's me being stupid for missing them out!

I have updated Github, thanks.

Is it possible also release a HX8357D parallel user setup as well and I will test that?

Any of the existing drivers can be used with a parallel interface display board. Just edit the driver to for example to:

#define HX8357D_DRIVER

Hi bodmer. compliment for your library i used it with esp32 and works very well with spi 2.4 ili9341 tft lcd.
now i want to use this library with an other 2.4" ili9341 tft lcd with 8 bit parallel interface, and esp32.

in User_Setup.h i uncomment only:

#define ILI9341_DRIVER

#define ESP32_PARALLEL.

the rest is commented.

in User_Setup_Select.h i uncomment only :

#include <User_Setup.h>

#include <User_Setups/Setup14_ILI9341_Parallel.h>

i had connected the esp32 to the lcd like this:

//#define TFT_CS 33
//#define TFT_DC 15
//#define TFT_RST 32

//#define TFT_WR 4
//#define TFT_RD 2

//#define TFT_D0 12
//#define TFT_D1 13
//#define TFT_D2 26
//#define TFT_D3 25
//#define TFT_D4 17
//#define TFT_D5 16
//#define TFT_D6 27
//#define TFT_D7 14

but the display doesn’t Work… where i’m wrong?

thanks for your work and your time…

in User_Setup_Select.h only one setup should be called up, comment out this one:

//#include <User_Setup.h>

The pins are defined for you in the “Setup14_ILI9341_Parallel.h” file.

You do not need to edit that file if you use the same pins, which you have.

thanks for your answer and your work here..

i don't know why, but my system doesn't work with this library. with graphictest_kbv from MCUFRIEND_kbv library works great.
i have a WROOM32 connected to the display by 15cm jump wire. i don't know if that are too long, but if with graphictest_kbv works, i don't thik thi is the issue..

David suggest me to buy a TTGO, but it is sold only in China and it arrive here after 30-40 days.. too long time.

i'll do a PCB with this connection in the week end, i hope, and i'll test it another time..

thanks for all..

What country are you in?

I bought my TTGO board from the UK. It probably took 2 days. Yes, it would have been cheaper from China but it is a long wait!

I am guessing that you are in Central Europe.

Seriously, you need good reliable connections e.g. from a shield.
Flying wires (especially if not soldered) are pretty suspicious.


I’m from Italy…
yesterday i welded short wires between WROOM32 and my 2.4lcd.

with graphictest_kbv works, but not with TFT_eSPI examples.

this is the report of the Read_User_Setup.ino

Processor    = ESP32

Frequency    = 240 MHz
Transactions = Yes
Interface    = Parallel
Display driver = 9341
Display width  = 240
Display height = 320

TFT_CS  = D33 (GPIO 33)
TFT_DC  = D15 (GPIO 15)
TFT_RST  = D32 (GPIO 32)

TFT_WR  = D4 (GPIO 4)
TFT_RD  = D2 (GPIO 2)

TFT_D0  = D12 (GPIO 12)
TFT_D1  = D13 (GPIO 13)
TFT_D2  = D26 (GPIO 26)
TFT_D3  = D25 (GPIO 25)
TFT_D4  = D17 (GPIO 17)
TFT_D5  = D16 (GPIO 16)
TFT_D6  = D27 (GPIO 27)
TFT_D7  = D14 (GPIO 14)

Font GLCD  loaded
Font 2      loaded
Font 4      loaded
Font 6      loaded
Font 7      loaded
Font 8      loaded
Smooth font enabled

i attached 2 configuration file… if could be useful… thanks and have a nice day…

User_Setup.h (11.1 KB)

User_Setup_Select.h (5.18 KB)


The settings you posted using the “Read_User_Setup” sketch look fine. I can only assume that the display is not an ILI9341. David’s library determines the correct driver by reading the display so maybe it woks because is it automatically selecting a different driver.

I do not have any other suggestions to help :-(, the 4 screens I tested all work fine with the settings you have used.

His controller is a "0x9302" of unknown manufacture. It starts by itself.
It may or may not be upset by a genuine ILI9341 initialisation.

I have never seen a 0x9302. So I can't test it.

Life gets fairly complicated when you have to support multiple controllers. Especially ones without any datasheet.

I would suggest that a regular SPI 3.3V ILI9341 display is used. It will work with any 3.3V MCU without wasting pins. It works nicely with ESP8266.