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).
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?
Here's a picture of the bottom of the board.
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.
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.