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).
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)
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).
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.
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 ?
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.