Need help with ST7789 display

Hello all,

I have a 1.54" IPS 240x240 TFT display. Please see the attached images. I use a 8266 D1 mini and my wiring is:

SCL --- D5
SDA --- D7
RES --- D2
DC --- D3

but this probably is wrong (got it from the net).

The code I use to test is the example program of Adafruit, ST7789 Library -> graphicstest. The changes I made to the source are that I use the following ST7789 lines instead of the ST7735 lines:

// For 1.14", 1.3", 1.54", and 2.0" TFT with ST7789:
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

and

// OR use this initializer (uncomment) if using a 1.3" or 1.54" 240x240 TFT:
tft.init(240, 240); // Init ST7789 240x240

What am I doing wrong? I cannot figure out and hope that someone can help.

Thank you,
Karl

From your photos TFT_CS looks as if connected to D4 pin.
But your text does not mention any define.

Life is easier if you quote your actual constructor statement. e.g.

// For 1.14", 1.3", 1.54", and 2.0" TFT with ST7789:
//Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
Adafruit_ST7789 tft = Adafruit_ST7789(D4, D3, D2);

Thank you for your reply! I tried your suggestion and it works. I did not have connected CS at all.

So, I think I'm all set then....

Karl

What is the BLK pin used for? Just curious.

Karl

Backlight. Either leave as no connection or attach to a GPIO pin.

Thank you. So I could switch backlight off by setting BLK to HIGH?

Karl

I suspect that the BLK pin is active-high. i.e. connect HIGH to switch backlight on.

It is simple enough to try.

  1. connect BLK to 3.3V. does it light?
  2. no connection. does it light ?
  3. connect BLK to GND. does it light ?

David.

Did as youn said. Connecting BLK to GND switches the light off.

Thx,
Karl

If you said that "1. connect BLK to 3.3V. does it light?" was YES.

And "3. connect BLK to GND. does it light ?" was NO

that means BLK is active-high. (and I suspect that n.c. is YES too)

Exactly as you say.

Karl

This topic was automatically closed after 90 days. New replies are no longer allowed.