GxTFT : TFT Display Library Framework for Arduino

Based on a new approach for a general TFT library.

This library framework separates the aspects IO connection, controller type and display class into separate C++ classes.

The purpose of this library and its design is to make additions easy.

Target audience is developers with experience in C++, Arduino IDE, and basic TFT knowledge, like me.

I needed a framework for my growing number of displays for Arduino; some made for Arduino, some for Raspberry Pi, some more exotic.

Controllers currently supported are HX8357, ILI9325, ILI9341, ILI9481, ILI9486, ILI9806, RA8875, SSD1963.

I share this library on GitHub, mostly to promote the design idea, but also as check of its usefulness.

Feedback is welcome, as well as suggestions for improvements or enhancements, and error reports.

I will try to give some support, but this is not the main goal of this topic; there are better libraries and topics for TFT support.

Jean-Marc Zingg

https://github.com/ZinggJM/GxTFT

I use my GxTFT library for experiments with TFTs and Arduino boards that are not so widely used (as far as I know).

Especially large TFTs or TFTs for STM32 boards with FSMC connectors.

So far I did not find additional TFTs for the common black STM32F407VE/ZE/ZG boards.

Thanks to this forum post I discovered a STM32 board with FSMC connector with a more common pinout for TFTs.

STM32F407ZGM4 board

I have added FSMC and bit shuffling P16 GxIO classes for this board and examples for matching TFTs to my GxTFT library.

Hello ZinggJM,

I am currently trying to integrate a new TFT into my project But I'm really struggling with getting started. (More on that here)

https://electronics.stackexchange.com/questions/389616/can-anyone-help-me-get-this-running-ili9806e-tft-on-a-teensy-3-5

Your library seems like it would be ideal for me but I could really use some example code or something similar. Would it even work with a teensy 3.5? Maybe it's just me but I haven't been able to find documentation for your library?

Hi gigajoules,

As you have found this topic, you have already seen the important remarks about this library.

There is no documentation, as this is not my strength, and I do not promote the library, but just the idea of separation of aspects of TFT use.

I am learning to use new TFT from time to time when I am not busy with e-paper displays. When doing so, I add support for the specific TFT to my library, so I know I can control that TFT, even if I know about libraries that are better suited.

The ILI9806 is a special case, I had bought a special 7" TFT with that controller. I did not find any library for that display, and asked for example or demo code from the supplier. I got an example and extracted the initialization code from it. You find the details in the sources in the GxTFT library.

If you would have provided a link to your display, or a picture, I might see if it corresponds to one of my displays with this controller.

The ILI9806 has many configuration options and features, so my controller class will only work with specific displays.

Take a look at GxTFT_Tiky_graphicstest

or GxTFT_myTFTs_graphicstest

and myTFTs

I have no Teensy and don't know about it for now; does it have enough pins for 16bit parallel interface?

Post picture and/or link to your display; I hope this helps for a start.

gigajoules: Hello ZinggJM,

I am currently trying to integrate a new TFT into my project But I'm really struggling with getting started. (More on that here)

https://electronics.stackexchange.com/questions/389616/can-anyone-help-me-get-this-running-ili9806e-tft-on-a-teensy-3-5

Your library seems like it would be ideal for me but I could really use some example code or something similar. Would it even work with a teensy 3.5? Maybe it's just me but I haven't been able to find documentation for your library?

I am currently testing ILI9806. There is a "test_9806" Branch on GitHub

  1. select 8080-8 hardware interface instead of DBI-typeC i.e. select BS3..0 for 0b0000 instead of 0b0011
  2. wire all your pins to the Teensy3.5 as if it was a MCUFRIEND shield on Arduino headers. e.g. LCD_RD goes to Analog#0, LCD_D1 goes to digital#8, LCD_D7 goes to digital#7.

The first step is to run the LCD_ID_readreg sketch. You should see the ID at reg(0xD3)

I suggest that you start with the Teensy3.5 IDE set to a very slow clock speed e.g. 32MHz. Then try higher speeds.

David.

Thank you very much David and ZinggJM, it's refreshing to have some good leads to go with. I'll give them a try!

Version 2.1.6 of Library GxTFT is available on GitHub. Downloadable and installable as ZIP-file.

  • added support for 3.97" NT35510 800x480 display
  • added support for STM32F407VxT6 board with FSMC 34 pin female TFT connector
  • details available here: STM32F407VxT6 Board - LCD wiki
  • supported by classes GxIO_STM32F407VxT6_P16 and GxIO_STM32F407VxT6_FSMC

Jean-Marc

Version 2.1.7 of Library GxTFT is available on GitHub. Downloadable and installable as ZIP-file.

  • added support for 4" ST7796S 480x320 34 pin TFT display

Jean-Marc