Own a SSD1289 TFT display and looking for more speed? Check this out!!

Just as I was preparing to port my code to mbed I've come across this:

http://gizmogarage.net

The implementation removes unnecessary stuff from the library, so only the SSD1289 Driver is present.
This is good for ITDB32S and TFT320_QVT panels. Most functions are coded in assembler, and it runs faster than in the video (It was clocked at only 10Mhz)!

I downloaded the file and made the required changes to work on an arduino mega with the TFT above and adapter shield Elecfreaks "TFT LCD Mega Shield v2.2". Pinout must be similar to other shields and can be found on the attached pdf below "UTFT_Requirements", Arduino Mega/Due Shield (Note: this code does not work in the Due).

Now I will see if I can modify it to drive the display in 8 bits as well.

The code uses some low level functions, not exactly the same as UTFT. There is an example attached, along with the complete library.

Note: Check post #3 for the code

Further updates;

I made some additional changes, so code working with the original UTFT library should now be compatible.
Check the attached example, the includes before setup must be present on your sketch.

Here's also a demonstration.

The Real speed without delays:

  • Standard UTFT on Arduino Mega
    21100ms

  • This version of UTFT, also on Arduino Mega
    9900ms (80% of the time spent on the random dots, otherwise comparable (actually faster) to the due)

  • UTFT on arduino DUE (ARM version)
    4100ms

I wanted to see it for myself so I did some timing tests using the standard UTFT demo code. I removed the random 10,000 pixel draw routine and just focused on the graphics calls. My results are similar to the OP's.

On a 16mhz standard Mega, with UTFT version 2.76, the test code ran in 10361 ms.

The identical test code with the SSD1289 speed ups ran in 843 ms.

Demo code attached. Unzip as a library, you'll need to remove any previous versions of UTFT since due to the naming conflict. Tested on 1.5.6-r2. Mega + ElecFreaks2.2 + 3.2"TFT w/SSD1289

Casemod: Would you post your latest version? I'd like to see it run on a Due! Thank you for your efforts.

UTFT.zip (30.5 KB)

avr_fred:
I wanted to see it for myself so I did some timing tests using the standard UTFT demo code. I removed the random 10,000 pixel draw routine and just focused on the graphics calls. My results are similar to the OP's.

On a 16mhz standard Mega, with UTFT version 2.76, the test code ran in 10361 ms.

The identical test code with the SSD1289 speed ups ran in 843 ms.

Demo code attached. Unzip as a library, you'll need to remove any previous versions of UTFT since due to the naming conflict. Tested on 1.5.6-r2. Mega + ElecFreaks2.2 + 3.2"TFT w/SSD1289

Casemod: Would you post your latest version? I'd like to see it run on a Due! Thank you for your efforts.

Thanks for mentioning, I forgot to update the latest version. Surprised you got the first code working.

The above wont run on a due, it makes low level calls to the hardware (8bit AVR), currently configured to run on a Mega.

Code below

UTFT.rar (27 KB)

Hi,

this is really interesting! I am using a DUE with a 7 inch touch tft with the SSD1963.
What do I have to do if I wanted to adapt your optimized library? Or what should I do with the UTFT library to increase speed?

I looked through your files in the library, but I don't understand that much...

I hope you can give some advice :slight_smile:

Vile

Hello, I wanted to ask if I can use with a ILI9341, if it can be used, which would have to change ?.
Thank you very much, greetings !!

flatron:
Hello, I wanted to ask if I can use with a ILI9341, if it can be used, which would have to change ?.
Thank you very much, greetings !!

While some of the speed-ups come from replacing C code with inline assembly, several of the significant performance increases are realized with hardware features native to the SSD1289 - features such as address auto-increment. As the ILI9341 lacks those features, it is not possible to just "change" the code.

Thanks for the reply, all this "problem" is that I used the library (GitHub - pantata/TFT9341SPI) does not work well the function to print a float (seguimos con la libretia UTFT error instruccion "myGLCD.NumF" - Software - Arduino Forum), download the original UTFT (no modification to the ILI9341) and the result is that the original runs much slower than I initially used, the original UTFT takes 4.6 seconds to fill the screen of a color with the previous did in less than 500ms and the same to draw squares and lines .... why had hope that you could use :frowning:

Hello :slight_smile:

I've just discovered this topic and I'm really interested by this...

I downloaded and tried both attached zip files, but they result in a fully white screen, nothing is displayed. The default utft lib is working, I use it with a Mega and sainsmart's tft shield, so my init code is normally:
UTFT myGLCD( ITDB32S, 38, 39, 40, 41);

So, the TFT itself uses Arduino pins 22 to 37 for data, and pins 38, 39, 40, 41 for control.. I've checked config.h file, it seem correctly setup already so it should work.. but it doesn't. Any idea what could be wrong?

I have a couple of ILI9341 based displays and have tweaked the Adafruit libraries for an UNO to boost graphics performance.

You can see videos of the common UTFT and Adafruit graphics test programs running in step 2 of this Instructable.

I don't think any more performance can be squeezed out of an UNO.

Hi, if you're looking for speed in a LCD with touch and vibrator (for haptics) please check out my web and the specific article for arduino.

Only 4 wires are needed to drive the LCD. Here is a video

thankyou for this!! i've also did some of the same things, but for the DUE. might put the source code online soon, but will still have to optimize the line and circle routines in a similar manner (12 bus accesses for a putpixel was pretty insane).