LCD wiki MSP4030 4.0inch Capacitive SPI Module User Manual
- June 16, 2024
- LCD wiki
Table of Contents
MSP4030 4.0inch Capacitive SPI Module
MSP4030_MSP4031
ESP32 Demo Instructions
CR2023-MI4035
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:
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
0
,| LCD CS| 1015| LCD selection control signal, Low level active
I| LCD RST| 1027| LCD reset control signal, Low level reset
| LCD RS| 102| LCD command / data selection control signal
High level: data, low level: command
| SDI(MOSI)| 1013| SPI bus write data signal(SD card and LCD screen used
together)
| SCK| 1014| SPI bus clock signal(SD card and LCD screen used together)
| LED| 1021| LCD backlight control signal (If you need control, please connect
the pins. If you don’t need control, you can skip it)
()| 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_MSP4030_MSP4031_ESP32-WROOM-32EHSPI directory, as shown in the following
figure: Description of sample program content
A. 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 03 display 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;
FExample 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 UI 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_constructionfor-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: Among them:
FT6336 arduino is the driver of FT6336 capacitive touch IC
LVgl is LVGL GUI graphics software library
TFT ESPI 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:UsersAdministratorDocumentsArduinolibraries.
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:
If 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:
lvgl: https://github.com/lvgl/lvgl/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/TJpg_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:LVGL library configuration: Copy the
lv_conf.h file which is in the Replace files directory to the top-level
directory of the lvgl library in the engineering library directory,As shown in
the following figure:
Open the lv_conf_internal.h file which is
in the Lvgl library src directory under the engineering library directory,As
shown in the following figure:
After opening the file, modify the content
of line 41 as shown in the following figure (from “../../lv_conf. h” to
“../lvconf. h”), and save after the modifications are completed.
Copy the examples and demos directories
under the engineering library directory to the src directory under the lvgl
library. These two directories are shown in the following figure in the lvgl
library:
The directory status after copying:
**TFT ESPI library configuration:
First rename the User_Setup.h file which is in the top-level directory of the
TFTeSPI 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:
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 Any sample program in the Demo_MSP4030_MSP4031_ESP32-WROOM-32E_HSPI
directory, as shown in the following figure (using the colligate test test
program as an example):
C. After opening the sample program,
select the ESP32 device, as shown in the following figure:
D. Configure ESP32 Flash, PSRAM, ports,
etc. as shown in the following figure: E. Click the upload
button to compile and download the program, as shown in the following figure:
F. If the following prompt appears, it indicates that the program has been
compiled and downloaded successfully, and has already been run:
G. 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_ESP32Flash_Download_LVGL_Demosbin directory,as
shown in the following figure:![LCD wiki MSP4030 4.0inch Capacitive SPI Module
- figure 18](https://manuals.plus/wp-content/uploads/2024/01/LCD-wiki-
MSP4030-4.0inch-Capacitive-SPI-Module-figure-18.png)Using the
flash_download_tool can burn in the Demo_ESP32Flash_Download_LVGL_Demos
directory, as shown in the following figure:
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>