TFT_eSPI only drives ST7735 at 5MHz

Hi. I recently bought a 128*160 TFT (allegedly ST7735R) from ebay. Marked "KMR-1.8 SPI" with a red tab.

Hooked it up to an ESP8266 and driving it via TFT_eSPI using default pin assignments.

I went through all the ST7735 driver subtype/speed selections and discovered it will only display stable output (no jitter, no data drop) if set as ST7735_INITB running with SPI frequency of 5MHz. Even then, the output is mirrored and needs flipping by writing TFT_MAD_BGR to TFT_MADCTL.

5 MHz seems a tad slow (in fact, so slow that some of the TFT_eSPI examples watchdog). Is this just a case of a poorly performing TFT display (cheap Chinese clone), or is there anything I could try to increase speed ? (FWIW, since board appears to have a regulator I tried both 3.3V and 5V VCC but no difference).

Post a link to the actual display that you have bought. e.g. Ebay sale page.

Please compare the item on your desk with pictures and description in the link.
Explain any differences. (or verify that it is accurate)

David.

https://www.ebay.co.uk/itm/162733094021

Item I received looks identical to advertised

Thanks for the link. I doubt that it is a ST7735R.

Please run the example from your TFT_eSPI library:
C:\Users\David Prentice\Documents\Arduino\libraries\TFT_eSPI\examples\320 x 240\Read_ID_bitbash\Read_ID_bitbash.ino

Copy-paste from the Serial Terminal to your message.

I have several ST7735S displays. They all work fine @ 27MHz in User_Setup.h but have glitches @ 40MHz.
Please run this example sketch:
C:\Users\David Prentice\Documents\Arduino\libraries\TFT_eSPI\examples\Test and diagnostics\Read_User_Setup

I have a GC9101 display that also runs ok @ 27MHz.
I don't have your KMR-1.8 display. I have a "similar" HY1.8 SPI display
I suspect that Bodmer has a KMR-1.8 (or other readers)

David.

David,

thanks for the response, and for taking an interest in this.

Enclosed are the requested diagnostics. Note that I did a bit more experimentation and discovered I could push the SPI frequency to 8 Mhz. After that I see data drop (missing characters in the example outputs).

10:07:14.206 -> ===========================
10:07:14.260 -> Register 0x01: 0x00
10:07:14.360 -> Register 0x04: 0x9102
10:07:14.360 -> Register 0x09: 0x610000
10:07:14.360 -> Register 0x0A: 0x08
10:07:14.360 -> Register 0x0B: 0x00
10:07:14.360 -> Register 0x0C: 0x06
10:07:14.360 -> Register 0x0D: 0x00
10:07:14.360 -> Register 0x0E: 0x00
10:07:14.360 -> Register 0x0F: 0x00
10:07:14.360 -> Register 0x2E: 0xFFFFFF
10:07:14.360 -> Register 0x3F: 0xFFFFFFFF
10:07:14.360 -> Register 0xDA: 0x00
10:07:14.360 -> Register 0xDB: 0x91
10:07:14.360 -> Register 0xDC: 0x02
10:07:14.360 -> ===========================
10:07:14.360 ->
10:07:14.360 -> Looks like driver chip is: Unknown

10:09:57.115 ->

10:09:57.115 -> TFT_eSPI ver = 2.2.6
10:09:57.115 -> Processor    = ESP8266
10:09:57.115 -> Frequency    = 80MHz
10:09:57.115 -> Voltage      = 3.32V
10:09:57.115 -> Transactions = No
10:09:57.115 -> Interface    = SPI
10:09:57.115 -> SPI overlap  = No
10:09:57.115 -> 
10:09:57.115 -> Display driver = 7735
10:09:57.115 -> Display width  = 128
10:09:57.115 -> Display height = 160
10:09:57.115 -> TFT_CS   = GPIO 8
10:09:57.115 -> TFT_DC   = GPIO 3
10:09:57.115 -> TFT_RST  = GPIO 4
10:09:57.115 -> Font GLCD   loaded
10:09:57.115 -> Font 2      loaded
10:09:57.115 -> Font 4      loaded
10:09:57.115 -> Font 6      loaded
10:09:57.115 -> Font 7      loaded
10:09:57.115 -> Smooth font enabled
10:09:57.115 -> 
10:09:57.115 -> Display SPI frequency = 8.00
10:09:57.115 ->

As I suspected. You do not have a genuine Sitronix ST7735.

10:07:14.360 -> Register 0x04: 0x9102

It looks like a GalaxyCore GC9102.

From the datasheet: tscycw >= 100ns i.e. < 10MHz SPI clock.
The ST7735S has: tscycw >= 66ns i.e. 15MHz SPI clock
The ILI9341V has: tscycw >= 100ns i.e. 10MHz SPI clock

I am constantly amazed by how some controller chips perform better than their datasheet spec.
e.g. ILI9341 @ 40MHz SPI
e.g. ST7735S @ 27MHz SPI

Since my GC9101 runs happily @ 27MHz I would expect the GC9102 to work @ 27MHz too.

You don't specify what the glitches look like.
The "graphictest" examples should reveal most problems.

I suggest that you always enable transactions in User_Setup e.g.

#define SUPPORT_TRANSACTIONS

And most importantly. Disable the timestamps in your Serial Terminal. It makes my head hurt.

Oh. If you are limited to 8MHz, don't worry. These small displays will still be pretty responsive. Speed is only noticeable on 320x480 or bigger displays.

David.

p.s. Ilitek and Sitronix datasheets are pretty good. However it is not uncommon for controller datasheets to have several errors. e.g. cut-paste from previous model datasheet.

David,

thanks very much for the analysis and additional info.

FWIW, at 10 MHz the graphicstest_PDQ3 will sometimes go to a whitescreen, while the test continues to log to serial console (with much the same values for performance stats). Sometimes it starts displaying graphics again, sometimes not. In the case of Colour_test, at 10MHz I see what I assume is occasional data loss, so e.g. string "Blue text" will be rendered as "Blue te t". Sometimes text on display will start jittering.

I don't suppose you have any recommendations for a reliable source, where its possible to buy an actual ST7735 with some degree of confidence ?

Red boards like this tend to have ST7735S

Note that buying from "UK Seller" that advertises 15 day delivery probably means that it comes from China.
So buying from a "Chinese seller" is going to take about the same time.

Of course the "UK Seller" might have popular items in stock. In which case it might arrive in 2 days.

If you are in the UK, PM me.

David.