0102030405
Model ST7735STFT Screen Driver
2025-01-22
This article provides a detailed introduction to the characteristics of the ST7735S TFT screen, including its specifications as a 262K color graphic TFT-LCD controller, supporting multiple interface modes, and providing pin instructions. At the same time, the article provides the process framework of the driver program, especially the code for initialization and key command control, including configuring frame rate, display direction, and gamma correction. In addition, some driver code was also presented, summarizing the key steps of driving the screen.
ST7735S is a single-chip controller/driver for 262K color graphic TFT-LCD. It consists of 396 source lines and 162 gate line driver circuits. This chip can be directly connected to external microprocessors and accept Serial Peripheral Interface (SPI), 8-bit/9-bit/16 bit/18 bit parallel interfaces. The display data can be stored in a 132 x 162 x 18 bit on-chip display data RAM. It can perform display data RAM read and write operations without an external operating clock to minimize power consumption. In addition, due to the integrated power circuit required to drive the liquid crystal, display systems with fewer components can be manufactured.

Introduction to TFT
The following is a 1.44-inch TFT color screen with ST7735S chip as the driver IC. The SPI interface of the LCD driver IC has been extended to the outside of the board for easy connection using DuPont wires. It is very friendly for partners who do not want to solder. The MCU used for this driver is the enhanced 51 microcontroller STC12 series MCU, as shown in the following figure:

Pin Description
Pin | Parameter |
VCC | 5V/3.3V power supply connection |
GND | grounding |
CS | LCD screen chip selection signal, low level enable |
RESET | LCD screen reset signal, low level reset |
A0 | LCD screen register/data selection signal, high level: register, low level: data |
SDA | SPI bus write data signal |
SCK | SPI bus clock signal |
LED | backlight control, high level illumination. If no control is required, connect to 3.3V and keep it on |
Program driver
The process framework is as follows
Created with Rapha ë l 2.3.0 Initialization Writing Display Function Display End Yes
Main command control

In the above picture, we can see that if you want to soft restart the LCD screen, you can directly look at the line in my circle. D/CX is 0, which means you need to select the write command. Personally, I suggest that when writing SPI code, select the high bit in the data transmission code before it, so that you can directly use the data in the HEX column, that is, use MCUw_rite_TFT-Byte (0x01) to complete the soft restart.

The three commands 2A, 2B, and 2C in the above figure are respectively for configuring the address selection area and coloring commands. After selecting the address and writing the corresponding data function, the screen can be addressed and colored.
