FT81x library for ESP32 - Page 1
Forum section: electronics / general

author: phanso
author_rank: Newbie
timestamp: January 19, 2021, 09:47:04 am
content: This is my first post, so I'm a newbie here. Altough I have some experience with microcontrollers, I need a little help.What I'm trying is to drive a FT813 "smart" touch display from a ESP32 module. (To build a 5-channel PWM LED dimmer. I know I can buy a RF controlled or wifi LED dimmer for almost nothing, but what's the fun?)More precisely, I made a PCB based on the ESP32 WROVER.The touch display I'm trying to add is the Powertip ph800480t013-ifc05. I noticed that there are different pinouts for the FPC20 flatcable. Mine has these:1 = GND, 2 + 3 = backlight 5V, 5 = 3V3 supply, 6 = GND, 10 = SCK, 11 = MISO, 12 = MOSI, 13 = /CS, 14 = /INT, 15 = /PDI'm trying to interface the display via the VSPI interface of the ESP32-WROVER. (GPIO23 = MOSI, GPIO19 = MISO, GPIO18 = SCK, GPIO05 = CS; these four pins together are the VSPI in ESP32 lingo)When I was looking around for suitable Arduino libraries, I found this one:https://github.com/lightcalamar/GD23ZESP32But unfortunately, it depends on a SD card library, which I cannot use in my application.Then I found a nice library that supports the ESP32 and the exact display I bought, but I can't figure out how to hook things up.https://github.com/RudolphRiedel/FT800-FT813I don't see which pins are used for the SPI interface. And I'm confused about CS1, CS2 and DC (data/command), which my display module does not have.(Maybe the author uses the display module in a different mode than the single SPI modus I'm trying to use?)Any help to get me started would be appreciated. (I was looking to find a way to contact the author of the lib, but I was unsuccessful.)

author: newbrain
author_rank: Super Contributor
timestamp: January 19, 2021, 10:43:45 am
content: Did you check lines 1212 and following inEVE_target.h?They seem to define a classical SPI, as you would expect, for ESP32.EtA: BTW, Hi and welcome!About contacting the author, you might try raising an issue or going to the original thread onhttps://www.mikrocontroller.net/topic/395608?page=single,which still seems to be alive and with posts also in English (if you are not a German speaker).

author: phanso
author_rank: Newbie
timestamp: January 31, 2021, 11:24:58 pm
content: Well, it seems to work. All I had to do was selecting the GPIO pins for the SPI bus and setting the correct defines (ESP32 for the microcontroller and EVE_PH800480, plus a bunch of size and sync settings for the display).For my specific display, I added these at the beginning of EVE_commands.cpp:#define EVE_HSIZE (800L) // 800 x 480 px#define EVE_VSIZE (480L)#define EVE_VSYNC0 (0L) /* Tvf Vertical Front Porch */#define EVE_VSYNC1 (10L) /* Tvf + Tvp Vertical Front Porch plus Vsync Pulse width */#define EVE_VOFFSET (23L) /* Tvf + Tvp + Tvb Number of non-visible lines (in lines) */#define EVE_VCYCLE (525L) /* Tv Total number of lines (visible and non-visible) (in lines) */#define EVE_HSYNC0 (0L) /* Thf Horizontal Front Porch */#define EVE_HSYNC1 (10L) /* Thf + Thp Horizontal Front Porch plus Hsync Pulse width */#define EVE_HOFFSET (46L) /* Thf + Thp + Thb Length of non-visible part of line (in PCLK cycles) */#define EVE_HCYCLE (1056L) /* Th Total length of line (visible and non-visible) (in PCLKs) */#define EVE_PCLK (2L) /* 60MHz / REG_PCLK = PCLK frequency 30 MHz */#define EVE_PCLKPOL (1L) /* PCLK polarity (0 = rising edge, 1 = falling edge) */#define EVE_SWIZZLE (0L) /* Defines the arrangement of the RGB pins of the FT800 */#define EVE_CSPREAD (0L) // was 1L#define EVE_TOUCH_RZTHRESH (1200L) /* touch-sensitivity */ // was 1800L#define EVE_HAS_CRYSTAL#define EVE_GEN 2#define EVE_CFAF800480E0_050SC // touch controllerI noticed that my voltage regulator, that brings the 24V supply down to 5V for the backlight, is overheating when I set the backlight to 100%.But for the rest, everything works as expected.@newbrain: Thank you for guiding me to the exact line in the code!I'm just getting started with these smart displays. My next step is to play around with the EVE Screen Designer application provided by FTDI.I believe that will make the GUI design a lot easier.P.S.: Sorry for the not so fast reply. I'm only playing around with this from time to time

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: March 20, 2021, 03:53:30 pm
content: Hey there, that is my library, found this thread by chance. :-)I do have a PH800480T013-IFC05 lying around for a couple of months but the datasheet from Powertip is incompleteand their "support" never bothered to answer my inquiry.QuoteCheck the README.md:The platform the code is compiled for is automatically detected thru compiler flags in EVE_target.h.Select the TFT attached by enabling one of the pre-defined setups in EVE_config.hProvide the pins used for Chip-Select and Power-Down in EVE_target.h for the target configuration you are usingQuoteThat does not configure the touch-controller, this would configure all the display parameters if it were set in EVE_config.h.At the top of EVE_commands.cpp it does nothing.If "at the top" is above #include "EVE.h", all the parameters you posted get overwritten.If that is below #include "EVE.h", you overwrite the already setup parameters.