adafruit / Adafruit-ST7735-Library

This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618
https://learn.adafruit.com/1-8-tft-display
565 stars 305 forks source link

Display randomly shifts with artifacts at the border #102

Open xinanhuang opened 4 years ago

xinanhuang commented 4 years ago

Hi! So I recently connected a st7735s display (80x160) up to my esp32 board and seem to not be able to get rid of random artifacts that cover the border of the screen. It also seems that the display is shifted at times, to which I tried to fix through changing the starting draw location in st77xx.h and changing the size of the draw area. However this doesn’t seem to improve the result, and the display also randomly shifts the displayed content in random direction once in a while.

I’m wondering if this is a timing issue, and if so, how would I be able to fix this? Thanks!

Thank you for opening an issue on an Adafruit Arduino library repository. To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:

If you're sure this issue is a defect in the code and checked the steps above please fill in the following fields to provide enough troubleshooting information. You may delete the guideline and text above to just leave the following details:

makermelissa commented 4 years ago

Could you try a slightly older version of the library to see if that fixes the issue? The width and height were recently swapped on this display. Thanks.

xinanhuang commented 4 years ago

Hi! It seems the issue persisted even I called back to the earlier location.

makermelissa commented 4 years ago

Ok, good to know I didn't break anything. Thanks for reporting this.

makermelissa commented 4 years ago

So is this an Adafruit 160x80 display that you are experiencing this with or a different brand? I'm wondering if it's related to #103.

dsvilko commented 4 years ago

You can try setting in _ST77xx.h: #define ST77XX_MADCTL_RGB 0x08 and in _ST7735.cpp:

_colstart = 26;
_rowstart = 1;

Together with thetft.invertDisplay(true), this has fixed the issues I was having with the 0.96" 80x160(RGB)IPS from Aliexpress.