1.8 TFT SPI 128*160 V1.1 ST7735 driver working properly with Adafruit library but not with TFT_eSPI

Hi,
before asking this question I read the previous discussions on this topic in the forum but I was not able to solve my problems, perhaps since I'm still a newbie.
I tried to run the TFT_eSPI examples for ST7735 1.8 128*160 TFT display on two TFTs ( I bought from the same seller) connected to my ESP32 but both of them show the same problem : a part of the screen is either black or with garbage.
Here is an example when running TFT_Clock_Digital

I tried in User_Setup all the suggested configurations for the ST7735 driver (GREENTAB and its variants, REDTAB, BLACKTAB) with width defined as 160 and height defined as 128, with MOSI 23, SCLK 18, CS 15, DC 2 and RST 4.

I also tried to run a very simple code of data collected from a BME280 and from DS3231RTC but there was the same problem.

However, if I run the same code with Adafruit _GFX and Adafruit_ST7735 ( obviously with CS defined as 13 and RST as 5) there is no problem.

So, I'm inclined to think that this is not an HW problem.
In the User_Setup_Select there is no preset setup for ST7735 lock_Digital128*160 and I'm not able to modify the setup in order to get the same result given by Adafruit library.
Since TFT-eSPI works quite fine for me with ILI9341 I would use it also for ST7735 if someone helps me.
Thanks in advance

Hello there Bruno! This looks like just a little mistake. Although you're using the display horizontally, its settings in User_Setup.h should be done like it's vertical. So, as you said:

Try using widith defined as 128 and height as 160 instead. I hope it helps!

Hi Silvxo,
thanks for your prompt answer and for your suggestion that solved my problem.
Since I hadn't found in User_Setup the combination of height and width you correctly suggested I erroneously thought that it was not allowed and I hadn'tried it.
Moreover I hadn't realized that the measures of pixels in this screen are supposed for a vertical position.
You saved my day.
Thanks again for you precioushelp and have a nice day

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.