Interfacing Arduino with ST7735 TFT Display

Adding a display to an embedded system can bring several benefits, making the device more user-friendly and functional. Displays can be used for diagnostics by showcasing error messages, system logs, or sensor readings in real-time. This can aid in identifying and resolving issues quickly and efficiently.
This post shows how to easily interface an Arduino board with ST7735 TFT display module, how to print texts, numbers, and draw shapes.

Abbreviations:
TFT: Thin-Film Transistor.
LCD: Liquid Crystal Display.
SPI: Serial Peripheral Interface.
MOSI: Master Out Slave In.
MISO: Master In Slave Out.
SCK: Serial Clock
DIY: Do-It-Yourself

Arduino NANO with ST7735 TFT display module

The ST7735 TFT Display Module:
The ST7735 is a driver IC commonly used for small, colorful TFT LCD screens. These displays are popular for hobbyist projects due to their low cost, ease of use, and wide availability. This type of displays can be used in various applications including: potable devices, embedded systems, and consumer electronics.
Here are some key features and specifications of the ST7735 display module:

  • Operating Voltage: Usually 3.3V for the logic and backlight, though some modules include a regulator for 5V input.
  • Display Size and Resolution: ST7735 displays come in various screen sizes, with the most common being 1.8 inches with a resolution of 128×160 pixels.
  • Color Depth: 18-bit (262,144 colors) or 16-bit (65,536 colors).
  • Communication Interface: These displays use SPI serial communication protocol to communicate with the master device.
  • SD Card slot: Some ST7735 breakout boards include a built-in SD card or microSD card slot. This allows us to store colored bitmaps on the SD card and easily display them on the screen.

The image shows a ST7735 breakout board with integrated component details:

ST7735 TFT breakout board

ST7735 Display Pin Configuration:
Typically, the ST7735 display module will have the following pins.

  • RST: Display reset pin, active low.
  • CS: Chip Select pin, active low.
  • D/C: Data/Command pin, select data or command input mode to the display, low for data mode and high for command mode.
  • DIN (MOSI): Data In, or Master-Out Slave-In pin, SPI data input to the display.
  • CLK: SPI clock input to the display.
  • VCC: Power supply pin, 3.3V or 5V.
  • BL: Backlight LED pin
  • GND: Ground.

The ST7735 display module shown in the above image can be supplied with 3.3V or 5V depending on the status of jumper J1, closing the jumper bypasses the AMS1117 3.3V LDO regulator and the display will be configured to work with 3.3V only.

Interfacing Arduino with ST7735 TFT Display Circuit:
Hardware circuit diagram of the example is shown below.

The ST7735 display module shown in project circuit diagram has 8 pins: (from right to left): RST (reset), CE (chip enable), DC (or D/C: data/command), DIN (data in), CLK (clock), VCC, BL (back light) and GND (ground).

Interfacing Arduino with ST7735 TFT display circuit

Hardware Required:
Required components are listed below.

  • Arduino UNO (or similar) board   —> Board details
  • ST7735 TFT display module
  • 5 x 2k ohm resistor
  • 5 x 1k ohm resistor
  • Breadboard
  • Jumper wires

The ST7735 TFT display controller works with 3.3V only (power supply and control signals). The display module is supplied with 5V that comes from the Arduino board. This module has a built-in 3.3V regulator (AMS1117 3.3) which drops the input 5V into 3.3V.

All Arduino UNO board output pins are 5V, connecting a 5V pin to the ST7735 TFT display may damage its controller chip.
To connect the Arduino to the display module, I used voltage divider for each signal line, this means there are 5 voltage dividers. Each voltage divider consists of  a 1k and 2k Ohm resistors, this drops the incoming signal voltage from 5V into 3.3V.

So, the ST7735 TFT display is connected to the Arduino board as follows (each one through voltage divider):
RST pin is connected to Arduino digital pin 8,
CS pin is connected to Arduino digital pin 9,
D/C pin is connected to Arduino digital pin 10,
DIN pin is connected to Arduino digital pin 11,
CLK pin is connected to Arduino digital pin 13.

Other pins are connected as follows:
VCC pin is connected to Arduino 5V pin.
GND pin is connected to Arduino GND pin.
BL (LED) pin is connected to Arduino 5V pin.

Pins 13 and 11 are hardware SPI module pins of the ATmega328P microcontroller, respectively for SCK (serial clock) and MOSI (master-out slave-in).

Interfacing Arduino with ST7735 TFT Display Code:
Project Arduino code is just an example of graphics test provided by Adafruit Industries, with some minor modifications.
To be able to compile project Arduino code, two libraries are required from Adafruit Industries:

The first library is a driver for the ST7735 TFT display which can be installed from Arduino IDE library manager (Sketch —> Include Library —> Manage Libraries…, in the search box write “st7735” and install the one from Adafruit).
The second library is Adafruit graphics library which can be installed also from Arduino IDE library manager.
During installation of the Adafruit ST7735 library, Arduino IDE may ask for installing some other libraries form Adafruit Industries (dependencies).

Project code was tested with the following library versions:
Adafruit GFX Library: Version 1.11.9.
Adafruit ST7735 and ST7789 Library: Version 1.10.4.
Adafruit BusIO: Version 1.16.1.

Programming Hints:
The used libraries are included in the Arduino code as shown below:

The connection between the Arduino UNO board and the ST7735 TFT display is as shown in the above circuit schematic, it is defined in the Arduino code as shown below:

The initialization of the ST7789 TFT display library with the connections previously defined:

The ST7735 display must be initialized before any print operation, if the initialization failed then the display will show only black screen. The initialization function of the display is the one below:

For more details about Arduino SPI communication, see the following page:
Arduino & Serial Peripheral Interface (SPI)

Rest of code is described through comments.

Full Arduino code:
Example Arduino code can be browsed through the below GitHub link:
ST7735-Graphics-Test

Interfacing Arduino with ST7735 TFT Display Video:
The video below shows my DIY hardware test circuit of an Arduino NANO board with ST7735 TFT display:

Arduino with ST7735 TFT Display Proteus Simulation Video:
The video below shows Proteus simulation of Arduino UNO board with ST7735 TFT display.
Note that Proteus simulation circuit is not the same as real hardware circuit, project hardware circuit diagram is shown above.

Proteus simulation file download link is below, use version 8.15 or higher to open it:
Arduino and ST7735 TFT Proteus simulation


Discover more from Simple Circuit

Subscribe to get the latest posts sent to your email.

Scroll to Top