Connect TFT Color Screen LCD Display Module Drive ST7735 Interface SPI 128*160 to ESP8266 or ESP32

Hello.

Do you know how to connect this screen 1.8 Inch TFT Color Screen LCD Display Module Drive ST7735 Interface SPI 128*160 to a Wemos D1 Mini board or ESP32?

1.8 Inch TFT Color Screen LCD Display

* 1.8-inch SPI serial screen with backplane module, requires at least 4 IO drivers
* Size: 1.8 inch SPI serial bus
* Resolution: 128*160
* Driver IC: ST7735
* The features of this module:
* 1. Support Arduino various MCU in-line without any wiring
* 2. Integrated voltage regulator IC, support 5V or 3.3V power supply
* 3. Onboard level shifting scheme, truly compatible with 5V/3.3V IO level. Support a variety of microcontroller IO connections
* 4. Integrated SD card expansion circuit,
* 5. Reserve SPI FLASH font circuit to facilitate extended application

I found this pinout table :

Number Pin Label Description
1 VCC 5V/3.3V power input
2 GND Ground
3 CS LCD chip select signal, low level enable
5 A0 LCD register / data selection signal, high level: register, low level: data
6 SDA SPI bus write data signal
7 SCK SPI bus clock signal
8 LED Backlight control, high level lighting, if not controlled, connect 3.3V always bright

Wemos D1 Mini
Here is the Wemos D1 Mini pinout:

So should I connect it like following?

Display pin Board pin AZDelivery D1 mini pin
Display VCC Board 3.3V 3V3
Display GND Board GND G
Display CS Board SS GPIO15 ?
Display RST Board GPIO2
Display A0 Board A0 Analog Input 0 A0
Display SDA Board SDA/MOSI GPIO4 PIN13 D7
Display SCK Board SCK GPIO5 PIN14 D5
Display LED Board 3.3v 3V3

Regards

Start here:

Doesn’t look like the easiest display to configure.

I have read this page (ST7735 Display) several times but on my display board I don’t have the DC pin, only the CS pin.

    reset_pin: D4
    cs_pin: D1
    dc_pin: D2

So, should I use I2C or SPI pins?

  1. I2C interface → SCL + SDA pins
  2. Serial peripheral interface (SPI) → SCK + MOSI + CS pins

Regards

If I get it right, you can pick any GPIO as the D/C

I also tried the following code with ESPHome but the screen remains white:

# Display stuff
# SPI and ST7735 160x80 display
# https://esphome.io/components/display/st7735.html
spi:
  clk_pin: D5
  mosi_pin: D7

display:
  - platform: st7735
    model: "INITR_BLACKTAB"
    reset_pin: D4
    cs_pin: D1
    dc_pin: D2
    rotation: 0
    device_width: 160
    device_height: 80
    col_start: 0
    row_start: 0
    eight_bit_color: True
    use_bgr: True
    update_interval: 5s
    lambda: |-
      // it.print(10, 10, id(mono8), "Hello World!");
      // Draw a line from [0,0] to [100,50]
      it.line(0, 0, 100, 50);
      // Draw the outline of a rectangle with the top left at [50,60], a width of 30 and a height of 42
      it.rectangle(50, 60, 30, 42);
      // Draw the same rectangle, but this time filled.
      it.filled_rectangle(50, 60, 30, 42);

      // Circles! Let's draw one with the center at [25,25] and a radius of 10
      it.circle(25, 25, 10);
      // ... and the same thing filled again
      it.filled_circle(25, 25, 10);
[18:09:22][C][spi:101]: SPI bus:
[18:09:22][C][spi:102]:   CLK Pin: GPIO14
[18:09:22][C][spi:104]:   MOSI Pin: GPIO13
[18:09:22][C][spi:106]:   Using HW SPI: YES
[18:09:22][C][st7735:376]: ST7735
[18:09:22][C][st7735:376]:   Rotations: 0 °
[18:09:22][C][st7735:376]:   Dimensions: 160px x 80px
[18:09:22][C][st7735:377]:   Model: ST7735 BLACKTAB
[18:09:22][C][st7735:378]:   CS Pin: GPIO5
[18:09:22][C][st7735:379]:   DC Pin: GPIO4
[18:09:22][C][st7735:380]:   Reset Pin: GPIO2
[18:09:22][D][st7735:381]:   Buffer Size: 12800
[18:09:22][D][st7735:382]:   Height: 80
[18:09:22][D][st7735:383]:   Width: 160
[18:09:22][D][st7735:384]:   ColStart: 0
[18:09:22][D][st7735:385]:   RowStart: 0

Which one of these two images matches the pinout of your display?

The info in this thread got a similar display working for me.

As indicated in my post I have the 1.8 Inch TFT Color Screen LCD.
I confirm that this same screen works correctly with an Arduino Nano W module so it’s either a wiring problem on my ESP module or a problem in my configuration.