Problem with 1,8" 128x160 TFT Display

Good Morning,
i've got an Arduino Uno with the TFT joy-it ST7735 1,8" Display. It works fine, but I've got a pixel-Problem. In the photo, you can see the Problem. I have no idea what to do. I followed the description of a known electronic market in Germany (Conrad). You can see some missing pixels at the left side, too. Can someone help me? Thank you!

My Display: http://www.produktinfo.conrad.com/datenblaetter/1400000-1499999/001409751-an-01-de-ARDUINO_TFT_DISPLAY_1_8_ZOLL.pdf

So what is the problem?

You are simply observing a "bad library" that is not configured properly.
I suggest that you try Bodmer's library.

Bodmer has published a diagnostic that will read the chip ID. I suspect that your chip is not a genuine Sitronix ST7735.

I have never used the built-in TFT library. I will try it for myself with a Sitronix ST7735S

David.

Good morning!
Thanks for your information! I tested Bodmer's library and in the beginning the display worked fine and without problems. After disconnecting it from the Laptop, the Display showed again 2 colorful lines. At the left and at the lower edge. Do you have a idea, what I could do?
Best regards,
Martin :slight_smile:

I have ordered a "similar" looking display. When it arrives (from China), I will see what controller it contains.

Of course you could do the same diagnosis on your board.

If you have configured Bodmer's library correctly, it should display properly. A good test is to draw a 128x160 rectangle.

David.

@martirueb

The problem is that the display you have needs a pixel coordinate offset to be included in the library.

My version of the Adafruit library here handles this offset depending on a "TAB" setting in the library user_setup.h file inside the library.

The joy-it sketch calls up the Adruino IDE's built in TFT library. Under the bonnet this TFT library uses a version of the Adafruit library but the selected display within that library matches the official Arduino TFT which does not have the offset. Your display however does have a coordinate offset.

You have 2 options:

  1. Use my adapted library here
  2. Make changes to the TFT library to suit your display.

Option 1 has the advantage that graphics operations are 3 to 10 faster than the IDE's built-in TFT library.
Option 2 has the advantage that the joy-it sketch could be made to work without changing the sketch.

If you have any questions then post back.

@Bodmer,

I find "pixel offsets" rather unusual. The ST7735 and similar controllers are capable of controlling 128x162 panels. The particular geometry e.g 128x128, 128x160, 128x162, ... is set in hardware.

Is it just a question of "feature-rich" Displays appearing on Ebay because someone made an error with the hardware?

In which case, it is easy enough to compensate in software. But if the hardware had been setup correctly, there would be no need for software kludges.
A year or two ago, there was a batch of ILI9163 displays with the wrong hardware configuration.

David.

@david_prentice

The problem appears to arise because the ST7736 driver can drive 132 x 162 pixels, so it depends on which row and column lines a PCB manufacturer decides to connect to a 128 x 160 pixel display as there are 4 more drive lines than needed in each axis.

The manufacturers then set the hardware GM0-2 bits to 000. I suspect this offset is deliberate so that a product developer gets locked in to use displays from a particular supplier.

bodmer:
@martirueb

The problem is that the display you have needs a pixel coordinate offset to be included in the library.

My version of the Adafruit library here handles this offset depending on a "TAB" setting in the library user_setup.h file inside the library.

The joy-it sketch calls up the Adruino IDE's built in TFT library. Under the bonnet this TFT library uses a version of the Adafruit library but the selected display within that library matches the official Arduino TFT which does not have the offset. Your display however does have a coordinate offset.

You have 2 options:

  1. Use my adapted library here
  2. Make changes to the TFT library to suit your display.

Option 1 has the advantage that graphics operations are 3 to 10 faster than the IDE's built-in TFT library.
Option 2 has the advantage that the joy-it sketch could be made to work without changing the sketch.

If you have any questions then post back.

Hi,
I know it's been a while since the last post in this thread but I have the same issue (and even the same display).
Would be nice if you could explain "Option 2" to me.

I suggest that you try (1) first. Post a link to the actual screen that you have bought. e.g. Ebay sale page.

I suspect that you are using ESP32 or ESP8266. In which case Bodmer's TFT_eSPI library is the most suitable anyway.

If you have different hardware or you really want to write your own library from scratch, say so.

You also need to explain your programming knowledge and experience. And if you have a GitHub account.

There is little point in covering complex technical details if they are outside your territory.

David.

@david_prentice

I'm using an arduino nano and this display 1.8“ Display | Joy-IT

I don't have any expirience with TFT-displays or edditing librarys.

Actualy it's working fine with the TFT_ST7735.h library (greentab2) from github but the documentation isn't thath great for a beginner like me.

I've found this thread Arduino Esplora TFT LCD (160x128) screen pixels do not match resolution (solved) - #8 by deeirl - Displays - Arduino Forum where tey
make changes in the .cpp file of the Adafruit library.

Is it possible to make similar changes in the TFT library?

TFT_ST7735.h sounds like Bodmer's library. (the TFT_eSPI author)

Bodmer offers several options for different "ST7735" panels. I suggest that you try each option.

Avoid the "TFT" library that comes with the Arduino IDE.

The "Joy-it" manual carefully avoids showing the pcb. Most TFT controllers require 3.3V GPIO logic. You should not connect directly to Uno or Nano 5V GPIO pins.

David.

I'm using GREENTAB2 (in the "User_Setup.h" file) and it works just fine.

The manual says, the display works with 3.3V as well as with 5V. So thats no problem.

Is there any better documentation than the keywords.txt ?

Becaus now im searching in all the example-files to find how to use all the functions.

Don't believe the manual. Look at the pcb. Does it have level shifting circuitry?

The ST7735 spec says absolute maximum 3.3V logic. But in practice the ST7735 seems to be input voltage tolerant.
Other controllers are NOT.

Either post the part numbers of any visible chips on the pcb.
Or post a clear photo of the pcb.

David.

The display is now running for ca. 2 days without any (visible) damage.
I didn't want to rip-off the display from the pcb but i think it's desinged for 3.3 and 5V.

After some testing I've noticed that the RED and the BLUE channel are changed.
So I changed the definet colors in the library (TFT_ST7735.h) and serched for a easy way to "convert" any rgb coler into he new "format" (0xBBBB BlGGG GGGlR RRRR)
With this site it's much more easyer to do: RGB565 Color Picker - Barth Development

(In the attachment is my "new" TFT_ST7735.h file.
(I've changed the green in "orange" a bit to RGB:(255, 116, 0) (original was RGB:(255, 165, 0)
and added the RGB-code of "pink".
The "ST7735-colors" are changed as well)

TFT_ST7735.h (12.1 KB)

The display is now running for ca. 2 days without any (visible) damage.
I didn't want to rip-off the display from the pcb but i think it's desinged for 3.3 and 5V.

You don't dismantle anything. Just look at the pcb side of your display. There will be some visible chips and some printed information e.g. model number.
Regulator chips often have 3 terminals and have a number e.g. 6575
Transistors often have 3 terminals e.g. J3Y

Most ST7735 displays contain a 3.3V regulator

Panels vary from one manufacturer to another.
RGB or BGR
Inverted or non-inverted e.g. Black / White
Geometry e.g. does a 128x160 rectangle line up correctly?
Color accuracy.

All controller chips can be configured to match the different panels.

Bodmer supports several common panels e.g. INITR_BLACKTAB

Select the panel that matches best.
If there is still a color or geometry problem please say so.

Bodmer's TFT_ST7735.h contains standard RGB colour values

You appear to have created a set of non-standard BGR colour values.

The ST7735 controller can display BGR or RGB. A single bit in MADCTL register.
The ST7735 controller can trim the colour accuracy. A set of GAMMA registers.

You can draw graphics in any colour. But rendering a photo needs colour accuracy.

If you provide feedback, it helps Forum members with the same Joy-It display.
That is how Forums work.

David.