Electrical – Maximum SPI speed of TFT display

displayspiteensy

I have a 1.8" TFT color display from Banggood. It's very nice with the vivid colors.

However, the screen refresh is slow. I'm limited by the SPI speed of 1 MHz. It results in an update rate of:

160 pixels x 128 pixels x 16 bit/pixel ÷ 1 MHz = 0.33s per frame

Effectively, it's even lower as the Teensy LC stops for about 1 cycle after each byte and there is overhead between the SPI transactions. So it's more like 0.5s per frame or 2 fps, which is very noticeable. It's more like a left to right swipe animation (see image below).

1.8" TFT display with breadboard

So my question is:

  • Is the speed limited by the display controller chip, probably a ST7735?
  • Or is the speed limited by my breadboard wiring?
  • Is there a faster display available where I could use the SPI bus at 4 or 8 MHz?

Update

Here's a picture of the bottom of the board.

enter image description here

Not much to see:

  • The SD card slot and the three resistors R1 to R3 are not used.
  • The resistor R4 close to the LED pin (right most on the image) is connected to the LED pin and has 7.5Ω (7R5).
  • The part with three legs in the top corner reads "V2PK". I guess it's a voltage regulator that would be used for 5V operation. I operate it a 3.3V. There's also a capacitor and an open jumper close to it.

The interesting part is probably hidden between the PCB and the display.

Solved

It's now properly working. On a Teensy LC it runs at 16 MHz, on a Teensy 3.2 it runs at 18 MHz. Both are the maximum SPI clock rates for these boards.

It turned out to be a software problem. The main problem was that I hadn't properly disabled DMA. It would then kick in too early on the next SPI transmission, i.e. it would start with the first byte of the transmission even though it was supposed to start on the second byte. This mixed up a few thing and left the device waiting for the last byte to be transmitted.

I still do not really understand why it work at lower frequencies but failed at higher ones.

Best Answer

TSCYCR, Serial clock cycle (Read) is 150 ns. That is 6.6 MHz. But don't expect miracles of a SPI display. (it might work just fine at 10Mhz)
The software should be optimized to update the least amount of pixels per refresh.

There are still a few things you can do:
- Reduce the color depth.
- Use a longer word. (eg: 16 instead of 8 bit)
- Make sure the SPI routine, if blocking, is as short as possible. Don't wait for the spi to complete, wait for spi to be ready for a new word.

If you want a fast display, get a parallel one with frame buffer you can do operations on.