LCD wiki ST7796 3.5inch IPS SPI Module Instructions

June 14, 2024
LCD wiki

MSP3525_MSP3526 ESP32 Demo Instructions
CR2023-MI2467

Introduction to Testing Platform

Development Board: ESP32-WROOM-32E devKit
MCU: ESP32-32E module
Frequency: 240MHz

Pin connection instructions

The module can be directly plugged into the ESP32-32E development board, as shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module -
partsLCD wiki ST7796 3.5inch IPS SPI Module -
parts1

ESP32-32E Test Program Pin Direct Insertion Instructions

Number| Module pins| Corresponding ESP32-32E development board wiring pins| Remarks
1| VCC| 5V| LCD power positive
2| GND| GND| LCD Power ground
3| LCD_CS| 1015| LCD selection control signal, Low level active
4| LCD_RST| 1027| LCD reset control signal, Low level reset
5| LCD_RS| 102| LCD command / data selection control signal
High level: data, low level: command
6| SDI(MOSI)| 1013| SPI bus write data signal(SD card and
LCD screen used together)
7| SCK| 1014| SPI bus clock signal(SD card and LCD screen used together)
8| LED| 1021| LCD backlight control signal (If you need control, please connect the pins. If you don’t need control, you can skip it)
9| SDO(MISO)| 1012| SPI bus read data signal (SD card and LCD screen used together)
10| CTP_SCL| 1025| Capacitive touch screen IIC bus clock signal (modules without touch screens do not need to be connected)
11| CTP_RST| 1033| Capacitor touch screen reset control signal, low-level reset (modules without touch screens do not need to be connected)
12| CTP_SDA| 1032| Capacitive touch screen IIC bus data signal (modules without touch screens do not need to be connected)
13| CTP_INT| 1039| Capacitor touch screen IIC bus touch interrupt signal, when generating touch, input low level to the main control (modules without touch screens do not need to be connected)
14| SD_CS| 1022| SD card selection control signal, low level active (without SD card function, can be disconnected)

Demo Function Description

This sample program uses the ESP32 hardware HSPI bus, which is located in Demo_ MSP3525_MSP3526_ESP32-WROOM-32EHSPI directory, as shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module -
parts2A. Example 01 Simple Test is a screen brushing test program, which does not rely on any software library;
B. Example 02 colligate Test is a comprehensive testing program that displays graphics, lines, and counts program runtime;
C. Example
03display Graphics is a graphic display testing program that displays various graphics;
D. Example 04 display Scroll is a scrolling test program that displays text scrolling;
E. Example
05 show SD bmp Picture is a BMP image display program that displays BMP format images within SD;
F. Example 06 show SD jpg Picture is a JPG image display program that displays images in jpg format within SD;
G. Example
07 display Phonecall is a touch testing program for telephone dialing, which simulates the dialing function through touch;
H. Example 08 touch Pen is a touch stroke test program that draws on the LCD screen through touch;
K. Example
09 LVGL Demos is an LVGL example display program that allows you to experience the powerful Ul design features of LVGL. The bin file for this example has been extracted and can be directly burned using the corresponding tool.

Demo Usage Instructions

  • Building Development Environment
    For specific methods of building a development environment, please refer to the “Arduino_development_environment_construction_for-ESP32-EN” document in this directory.

  • Installing software library
    After the development environment is set up, the software library used by the sample program needs to be copied to the project library directory so that the sample program can be called. The software library is located in the Install libraries directory, as shown in the following figure:

LCD wiki ST7796 3.5inch IPS SPI Module - parts3 Among them:
FT6336 arduino is the driver of FT6336 capacitive touch IC
LVglis LVGL GUI graphics software library
TFTESPI is an Arduino graphics library for TFT-LCD LCD screens, supporting multiple platforms and LCD driver ICs
TJpg
Decoder is a JPG format image decoding library for the Arduino platform
These software library have been configured and can be directly copied to the project library directory for use. The default path for the engineering library directory is C:\Users\Administrator\Documents\Arduinol\libraries. You can also change the project library directory: open the Arduino IDE software, click File ->Preferences, and reset the Sketchbook location in the pop-up interface, as shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI
Module - parts4If you do not want to use the already configured library, you can download the latest version of the library (excluding FT6336 arduino) from Github at the following download address and then configured:
Ivgl: https://github.com/Ivgl/Ilvgl/tree/release/v8.3 (Only V8. x version can be used, V9. x version cannot be used)
TFT_eSPI: https://github.com/Bodmer/TFT_eSPI
TJpg_Decoder: https://github.com/Bodmer/TIpg_Decoder
After the library download is completed, unzip it (for easy differentiation, rename the unzipped library folder, as shown in the Install libraries directory), and then copy it to the engineering library directory. Next, proceed with library configuration. The files that need to be replaced are located in the Replaced files directory, as shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module - parts5LVGL library configuration:
Copy the Iv_conf.h file which is in the Replace files directory to the top- level directory of the Ivgl library in the engineering library directory,As shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module -
parts6Open the Iv_conf_internal.h file which is in the Lvgl library src directory under the engineering library directory,As shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module -
parts7After opening the file, modify the content of line 41 as shown in the following figure (from “../../iv_conf. h” to “../Ivconf. h”), and save after the modifications are completed. LCD wiki
ST7796 3.5inch IPS SPI Module - parts8Copy the examples and demos directories under the engineering library directory to the src directory under the Ivgl library. These two directories are shown in the following figure in the Ivgl library: LCD wiki ST7796 3.5inch IPS SPI
Module - parts9The directory status after copying: LCD wiki ST7796 3.5inch IPS SPI Module - parts10**TFT ESPI library configuration:
First rename the User_Setup.h file which is in the top-level directory of the TFTeSPl library of the engineering library directory to User Setup_ bak.h,then copy the User_Setup.h file which is in the Replaced files directory to the top-level directory of the TFT_eSPI library, As shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module -
parts11First rename the ST7796_Init.h file which is in the TFT_Drivers directory of the the TFT_eSPI engineering library directory,then copy the ST7796_Init.h file to the TFT_Drivers directory of the the TFT_eSPI engineering library directory, as shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module - parts12
◊ Compile and Run Programs
After the library installation is completed, the sample program can be compiled and run as follows:
A. Plug the display module directly into the ESP32 development board, and connect the development board to a PC to power on;
B. Open Demo ESP32-WROOM-32E Any sample program in the HSPI directory, as shown in the following figure (using the colligate test test program as an example): LCD wiki ST7796 3.5inch IPS SPI Module -
parts13C. After opening the sample program, select the ESP32 device, as shown in the following figure: LCD wiki ST7796 3.5inch
IPS SPI Module - parts14D. Configure ESP32 Flash, PSRAM, ports, etc. as shown in the following figure: LCD wiki ST7796 3.5inch
IPS SPI Module - parts15E. Click the upload button to compile and download the program, as shown in the following figure: LCD wiki
ST7796 3.5inch IPS SPI Module - parts16F. If the following prompt appears, it indicates that the program has been compiled and downloaded successfully, and has already been run: LCD wiki
ST7796 3.5inch IPS SPI Module - parts17G. If the display module displays content, it indicates that the program has run successfully.
◊ LVGL example bin file burning**
Due to the long compilation time of the LVGL sample program, the compiled bin file has been extracted and can be directly burned using the flash download tool.
Bin file located in
Demo_ESP32\Flash_Download_LVGL_Demos\bin directory,as shown in the following figure: LCD wiki ST7796 3.5inch IPS SPI Module -
parts18Using the flash_download_tool can burn in the
Demo_ESP32\Flash_Download_LVGL_Demos directory, as shown in the following figure:LCD wiki ST7796 3.5inch IPS SPI Module -
parts19

www.lcdwiki.com

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

LCD wiki User Manuals

Related Manuals