ST7789 SPI TFT 240×240 without CS Pin Interfacing ESP8266

ST7789 SPI tft without cs pin esp8266 wemos d1

ST7789 Chip is used in SPI interface based TFT LCD displays. ST7789 SPI TFT displays are very chip in price and produce high-density Colorful images.
But, the Chinese clone of ST7789 modules ships without a CS pin. Mainly the Resolution of the display is 240×240. In this post, I will share how to connect ST7789 SPI TFT LCD Displays 240×240 without CS Pin with ESP8266 based boards. Here I will use the Wemos D1 Board.

ST7789 SPI tft without cs pin esp8266 wemos d1

Components Used:(Click to Buy)

Connect ESP8266 with ST7789 SPI TFT

This display works with 3.3V power and the ST7789 chip works with 4 wire SPI interface. This display comes with 7 pins. But, we do not connect anything with the rightmost pin. Because this is the backlight on /off the pin. If we connect this pin with GND (Ground) the display backlight will be off.

Here, we will use 2 hardware SPI pins of ESP8266 boards. These pins are predefined. Other two pins we can select any two Digital pins.

ST7789 SPI TFT 240x240 without CS Pin Interfacing ESP8266
ESP8266ST7789
3V3VCC
GNDGND
D5SCL
D7SDA
D2RES
D3DC

Add Library For ST7789 SPI TFT

First of all, we have to download and import the Libray.
In this tutorial, I have used these 2 libraries from Github. Both must be included in the header.
Arduino-ST7789-Library
Adafruit-GFX-Library
So, just Download ZIP and import in your Arduino IDE or Platform IO.

Code Explain

Using the 9,10,11 & 12 lines we defined the pins for the Display. RST & DC pins can be changed to other Digital pins, but MOSI & SCLK can not be changed as it is hardware design specific.

Then, on line no 13, we defined a display object named “TFT“. On line no 200, we initialized the display with 240 height and 240 width. If you have different resolution display, then change the value with yours.

Demo Arduino Sketch for ST7789 SPI TFT Display

Now, Run the following demo code for your ST7789 SPI interfacing display and check the display is working or not.

Output

ST7789 SPI TFT 240x240 without CS Pin Interfacing ESP8266

Finally, all done. we can see the text on ST7789 SPI TFT Display.

Connect LCD Display with ESP8266

Share
Tweet
Share
Pin it
Share
Share
Share
Share
0 0 votes
Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Get Instant Updates of New Posts

Join our Telegram Channel

JOIN NOW

Sign Up for Weekly Newsletter

Related Posts