Line at the Bottom of 1.8" SP7735 Display?

Hi Everyone:
I am using

  • a Waveshare 1.8" 128x160 SP7735S driven display connected to an Arduino Micro clone, using a 74LVC245 to shift from 5V to 3.3V
  • Adafruit_GFX.h with U8g2_for_Adafruit_GFX.h for font support (and better cursor management)

The issue I am having is that when the screen is in orientation 1 (landscape with wire harness on the left), I get a purple line at the bottom of the screen, seemingly below row 128.

When I switch to orientation 3 (landscape with wire harness on the left), I don't get the line at the bottom, but I do get a couple of odd pixels on the right of the display.

Is it a bad display? design issue? is it some artifact of this library?

Code and photos are attached (in-line boxes in the schematic are level shifters). This is a screen layout test only, so please ignore the fact that the code doesn't do anything useful.

adafrui_st7735_test.ino (3.58 KB)

I would expect Adafruit_ST7735, Adafruit_GFX, U8g2_for_Adafruit_GFX to play cricket together.

Note that there are several hardware configurations requiring different InitR arguments.
You have chosen

   display.initR(INITR_BLACKTAB);      // Init ST7735S chip, black tab

Your code works fine on a Red SPI ST7735 display. I get your second picture but without the extraneous dots.
Rotation = 1 or 3 both work ok.

I used a Red 1.8 inch SPI display with a 3.3V Uno clone without any level shifters.

I suggest that you try different INITR arguments. And draw two rectangles e.g.

    tft.drawRect(0, 0, tft.width(), tft.height(), WHITE);
    tft.drawRect(2, 2, tft.width() - 4, tft.height() - 4, WHITE);

This is a good test for any rotation. Especially with hardware variants.

I have a Leonardo clone. But I have no intention of connecting level shifters to ANY Arduino when 3.3V logic is available on other targets.

David.

I have the version of that TFT with touch panel on the teensy 4, with the ST7735_t3 library. I had the same problem.

Locate these lines within the Adafruit_ST7735.ccp file (line 237):

  } else {
    // colstart, rowstart left at default '0' values
    displayInit(Rcmd2red);
  }

Substitute for these instructions:

} else {
    // colstart, rowstart left at default '0' values
    displayInit(Rcmd2red);
    _colstart = 2;  //2
    _rowstart = 1;  //1
}

Save the changes and reload your favorite sketch.

Thank you! Your rock!

I take it that the actual resolution of this display 129x162, and this makes sure that the 1st row and 1st and 2nd column are not actually addressed?

How did you figure this out?