LCDWIKI MSP3525 3.5inch IPS SPI Module User Manual

June 14, 2024
LCDWIKI

MSP3525 &MSP3526
3.5inch IPS TFT SPI Display Module
User Manual

Rsource Description

The resource directory is shown in the following figure:

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 1

Directory Content Description
1-Demo Contains sample programs and usage instructions for each MCU
2-Specification Including LCD screen specifications and product

specifications
3-Structure_Diagram| Including touch screen size structure documents, product size structure documents
4-Driver_IC_Data_Sheet| Including LCD screen driver IC Datasheet and Touch Screen driver IC Datasheet
5-Schematic| Including product hardware schematic diagram, LCD Altium component diagram, and PCB packaging
6-User Manual| Contains product user instructions document
7-Character&Picture_Molding_Tool| Contains image extraction software, character extraction software, and software usage instructions. The image and text display tests in the sample program require the use of these two software for mold taking.

Interface Description

The interface on the back of the module is shown in the following figure:

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 2

Number Module Pin Pin Function Description
1 VCC LCD power positive
2 GND LCD Power ground
3 LCD_CS LCD selection control signal, Low level active
4 LCD_RST LCD reset control signal, Low level reset
5 LCD RS LCD command / data selection control signal High level: data, low

level: command
6| SDI(MOSI)| SPI bus write data signal(SD card and LCD screen used together)
7| SCK| SPI bus clock signal(SD card and LCD screen used together)
8| LED| 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)| SPI bus read data signal (SD card and LCD screen used together)
10| CTP_SCL| Capacitive touch screen IIC bus clock signal (modules without touch screens do not need to be connected)
11| CTP_RST| Capacitor touch screen reset control signal, low-level reset (modules without touch screens do not need to be connected)
12| CTP_SDA| Capacitive touch screen IIC bus data signal (modules without touch screens do not need to be connected)
13| CTP_INT| 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| SD card selection control signal, low level active (without SD card function, can be disconnected)

Working principle

3.1. Introduction to ST7796S Controller
The ST7796S controller supports a maximum resolution of 320 * 480 and has a GRAM of 345600 bytes in size. Simultaneously supports 8-bit, 9-bit, 16-bit, 18-bit, and 24-bit parallel port data buses, as well as 3-wire and 4-wire SPI serial ports. Due to the large number of 10 ports required for parallel control, SPI serial port control is the most commonly used. The ST7796S also supports 65K, 262K, and 16.7M RGB color displays, with rich display colors. It also supports rotation and scrolling display, as well as video playback, with various display methods.
The ST7796S controller uses 16bit (RGB565) to control the display of one pixel, so it can display up to 65K colors per pixel. The pixel address is set in the order of rows and columns, and the direction of increase and decrease is determined by the scanning method. The ST7796S display method is based on setting the address first and then setting the color value.
3.2. Introduction to SPI Communication Protocol
The writing mode timing of the 4-wire SPI bus is shown in the following figure:

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 3

CSX is a slave chip selection, and the chip will only be enabled when CSX is at low power level.
D/CX is the data/command control pin of the chip. When DCX is writing commands at low levels, data is written at high levels SCL is the SPI bus clock, with each rising edge transmitting 1 bit of data;
SDA is the data transmitted by SPI, which transmits 8 bits of data at once. The data format is shown in the following figure:

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 4

High bit first, transmit first.
For SPI communication, data has a transmission timing, with a combination of real-time clock phase (CPHA) and clock polarity (CPOL):
The level of CPOL determines the idle state level of the serial synchronous clock, with CPOL=0, indicating a low level. CPOL pair transmission protocol
The discussion did not have much influence;
The height of CPHA determines whether the serial synchronous clock collects data on the first or second clock jump edge, When CPHL=0, perform data collection at the first transition edge;
The combination of these two forms four SPI communication methods, and SPI0 is commonly used in China, where CPHL=0 and CPOL=0

Hardware Description

4.1. 6P capacitive touch screen FPC interface

P1is a flip over FPC holder with a spacing of 6P 0.5mm, used to connect the 6P FPC cable of the capacitive touch screen and connect touch signals.
4.2. Power supply voltage stabilizing circuit

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 6

This circuit is used to stabilize the input voltage of the module, where VCC is the external input voltage, VCC3.3V is the module input voltage, and C1 is the bypass filter capacitor. VCC can be connected to 5V or 3.3V, and it is recommended to connect to 5V because only by connecting to 5V can VCC3.3 output 3.3V. If connected to 3.3V, VCC3.3 output voltage will be less than 3.3V, which will cause the backlight brightness of the LCD screen to darken.

4.3. SD card slot interface circuit

SD_ CARD1 is a Micro SD card slot for inserting Micro SD cards, making it easy to use SD card expansion functions. The SPI bus and LCD used are shared.

4.4. Backlight control circuit

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 8

R1 is reserved for compatibility with the J3Y control circuit, directly using a 0 ohm resistor. R2 is the backlight current limiting resistor, R7 is the pull-up resistor, and Q1 is the BSS138 N channel field-effect transistor. LED is the control signal, and LEDK is connected to the negative pole of the backlight. When the LED is suspended (without a control signal), due to R7 pull-up, the source of BSS138 is at a high level, with its gate and drain conducting, LEDK grounded, and the backlight circuit conducting, thus turning on the light. When the LED input is low, the source of BSS138 is low, its gate and drain are cut off, LDEK is suspended, and the backlight circuit is cut off, thus turning off the light; When the LED input is at a high level, the source of BSS138 is at a high level, its gate and drain are conductive, LDEK is grounded, and the backlight circuit is conductive, thus turning on the light;

4.5. Capacitor touch screen IIC signal level conversion circuit

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 9

R3, R4, R5 and R6 are pull-up resistor, and Q2 and Q3 are BSS138 N-channel FETs. CTP_ SDA. CTPIIC signal input from SCL main control terminal, 3V3 CTP_ SDA. 3V3CTP SCL is the converted IIC signal. The function of this circuit is to convert the 5V or 3.3V IIC signal input from the main control terminal into a 3.3V 1IC signal, and then input it into the capacitive touch module (because the capacitive touch module can only receive 3.3V signals). It can also convert the 3.3V signal output from the capacitive  touch module into a 5V signal and input it to the main control. The principle is (taking SDA as an example): the source of BSS138 is always at 3.3V level, and when CTP SDAis at low level, the drain of BSS138 is at level, the source voltage is higher than the drain, the gate and drain are conducting, and the gate is also at low level, 3V3 CTP SDA is a low level; When CTP SDA is at high level, with the drain 5V level of BSS138.
The source voltage is lower than the drain, and the gate and drain are cut off. The gate is pulled up to 3.3V high level, with 3V3 CTP SDA is a high level. vice versa.

4.6. 14P Header pin interface

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 10

J2is 14P pin, R8 is the pull-up resistor of SD card CS pin. The 14P pin is used to connect to the main control, which can be directly inserted or connected through a DuPont cable. Because the SD card and LCD share the SPI bus, first pull up the CS pin of the SD card to disable its functions and avoid SPI bus device conflicts when the module is in use.

4.7. 14P FPC interface circuit

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 11

P2 is the module 14P FPC cable interface, which can only be connected to the main control through the FPC cable.

4.8. Control signal level conversion circuit

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 12

U2is a level conversion IC that converts between 5V and 3.3V. This circuit only uses the one-way function of 5V to 3.3V, and the signals that the module needs to write are converted through this circuit.

4.9. 48P LCD screen cable welding interface

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 13

QD1 is a 48P pad with a spacing of 0.8mm. Used to weld the LCD so that it can receive signals from the main control.

Example program usage instructions

For specific instructions, please refer to the example program usage instructions document in the example program directory.
A. Connect the display module to the main control board (directly plug in, use DuPont cable or FPC cable connection);
B. Connect the main control board to the PC (it needs to be connected according to the download method) and power on the main control board;
C. Modify, compile, and download sample programs;
D. Check the display of the module and check if the program runs successfully;

Common tool software

The example program needs to display both Chinese and English, symbols, and images, so it requires the use of mold taking software. There are two types of mold taking software: Image2Lcd and PCtoLCD2002. Image2Lcd is used for color image extraction, while PCtoLCD2002 is used for text or monochrome image extraction.
The PCtoLCD2002 mold taking software is set as follows:
Dot Matrix Format Selection Yin Code Select row by row mode for mold taking Select the direction of the mold taking direction in the clockwise direction (with the higher position in front)
Output Number System Selection Hexadecimal Number Custom Format Selection C51 Format

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 14

The specific setting method can be found on the following webpage:
http://www.lcdwiki.com/Chinese_and_English_display_modulo_settings
The Image2Lcd mold taking software settings are shown in the following figure:

LCDWIKI MSP3525 3.5inch IPS SPI Module - App 15

The Image2Lcd software needs to be set to scan horizontally, from left to right, from top to bottom, and with low bits in front.

www.lcdwiki.com

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals