Increase SPI speed on ST7735 1.8TFT with Arduino Uno

Hello everybody,

I'm working on a 1.8 TFT screen (based on the ST7735 chip) with Arduino Uno using the hardware SPI.

All is working good but I need to increase the speed of the display (drawing a bitmap is too long for example)

I'm using the TFT.h library (wich is based on the ST7735 library from Adafruit)

I guess, I have to increase the SPI speed of the Uno but I don't know how I have to do.

If someone can help me please?

Thank you.

I expect the SPI is already running flat out.

You could try the optimised PDQ library here. That will probably run twice as fast but if you need better performance then you will need a faster processor, for example a Due plus a parallel port display.

Thank you for the answer.

I have already make a project using the TFT.h library and some functions are not supported with the Adafruit_ST7735.h (for example : screen.text(text, xPos, yPos); screen.loadImage(name); etc.)
If I could make no change of my previous code it will be great.

Is there another way for increase speed? I think Esplora was using the same screen with an ATmega32u4 (that's run at 16MHz too).

Thank you.

If you use USART_MSPI instead of the bufferless SPI peripheral, you can get maximum SPI throughput.
Just look at the bus with a Logic Analyser.

Of course, you may not want to steal the USART. In which case you optimise use of the SPI.

The small 128x128 or 128x160 displays work plenty fast enough. It is only the larger screens that show up the serial i/f.

David.

Ok, thank you for your answers.

It seems that I have to change my board for a fastest one.

There is no need to change your board or the display.

The SPI interface should give you a fast snappy display. And is considerably easier than all the wires and level-translation of a parallel display.

Yes, the basic Adafruit_ST7735 library could be faster.
I was not aware of the "PDQ_ST7735" library. I will see how it compares with my own one.

What bitmap is taking too long?
A small icon in Flash memory is very quick.
Processing a 24-bit BMP file on a SD card is reasonable.
If you pre-process the 24-bit BMP into a 16-bit RAW file on the SD card, it is less bytes, less processing and faster to draw.

Most BMP examples use 24-bit. There are several other BMP formats that have smaller disk files and less processing than 24-bit. But your sketch needs to accept these other formats.

David.

Ah-ha. I am impressed by the speed of the PDQ_ST7735 library.

Running the regular Adafruit tests running on a 16MHz ATmega328 with hardware SPI:

4.98 sec   Adafruit_ST7735
1.71 sec   ST7735X_kbv
1.30 sec   PDQ_ST7735

PDQ_ST7735 is almost 4x faster than the Adafruit library. I would be quite happy with the Adafruit performance in the first place.

David.

Pawla:
Ok, thank you for your answers.

It seems that I have to change my board for a fastest one.

Before you part with your money and end up being disappointed it would be worth stating what performance you are looking for (full screen bitmap updates per second?), indicating your operating scenario and why this high performance is desirable in your project. Often very significant performance increases can be made simply by making small changes to the sketch (for example only updating areas of the screen that change, example here). You may find no standard (non-optimised) setup will meet your needs even with a Due, so for any performance improvement path some code mods/hacking will be needed (which you appear reluctant to do).

I agree 100%.

Explain what you want to do. And at what speed you want to do it.

You can certainly render a photo from a SD card. Or draw graphics from scratch.
The PDQ_ST7735 library is very impressive. (I am not so impressed with the examples)

David.