Go Down

Topic: Experimental library for ESP32 and 8 bit parallel displays, e.g. mcufriend style (Read 4100 times) previous topic - next topic


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.




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.

Go Up