LCDWIKI CR2020-MI4185 5.0 Inch RGB Display Module User Manual

June 15, 2024
LCDWIKI

LCDWIKI CR2020-MI4185 5.0 Inch RGB Display Module User Manual
LCDWIKI CR2020-MI4185 5.0 Inch RGB Display Module

Product Description

The product is a 5.0-inch RGB interface TFT LCD display module. The module supports the screen switching of 800×480, and supports up to 24bit rgb888 16.7M color display. There is no controller inside the module, so external controller is needed. For example, ssd1963 driver IC can be used as MCU LCD, and MCU with RGB controller (such as stm32f429, stm32ft767, stm32h743, etc.) can be used as RGB LCD. The module also supports the switching function of capacitive touch screen and resistance touch screen

Product Features

  • 5.0-inch color screen, support 24BIT RGB 16.7M color display, display rich colors
  • Support 800×480, the display effect is very clear
  • Support 24 bit RGB parallel bus transmission
  • Compatible with RGB interface connection of punctual atomic development board and wildfire development board
  • It supports the switching between capacitive touch screen and resistance touch screen, and the capacitive touch screen can support up to 5 touch points
  • Provides a rich sample program for STM32 platforms
  • Military-grade process standards, long-term stable work
  • Provide underlying driver technical support

Product Parameters

Name Description
Display Color RGB888 16.7M (compatible with rgb5665k) color
SKU MRG5101(no touch), MRG5111(have touch)
Screen Size 5.0(inch)
Type TFT
Driver IC None
Resolution 800’480 (Pixel)
Module Interface 24Bit RGB parallel interface
Touch Screen Type Capacitive or Resistive touch screen
Touch IC FT5426(Capacitive touch), XPT2046(Resistive touch)
Active Area 108.00×64.80(mm)
Module PCB Size 121.11×95.24(mm)
Operating Temperature -10`C-60t
Storage Temperature -20 C-70 ‘(..’
Input Voltage 5V
10 Voltage 3.3V
Power Consumption 64mA(The backlight is off), 127mA(The backlight is the

brightest)
Product Weight(Net weight)| 111g

Interface Description

The module is compatible with the RGB interface of punctual atomic development board and wildfire development board, and is connected with the development board through 40 pin flexible cable. The appearance is shown in Picture 1 and Picture 2.

Picture1. Front view of module

Front view of module 

Picture2. Back view of module

Back view of module

The module interface and selection circuit are shown in Picture 3:

Picture3. The module interface and selection circuit

Selection Circuit

Each identification circuit in Picture 3 is described as follows:

  1. Capacitive touch screen circuit
  2. Resistance touch screen circuit
  3. Disp resistance
  4. P2 interface (compatible with atomic RGB interface)
  5. P3 interface (compatible with wildfire RGB interface)
  6.  Module ID defines resistance (only for punctual atomic program)

The module supports switching between capacitive touch screen and resistive touch screen. When using capacitive touch screen, please weld Capacitive touch screen circuit; when using resistance touch screen, please weld Resistance touch screen circuit. If you often need to switch the touch screen, the simplest way is to solder other circuits and switch only the drain in the dotted line box

If you connect the wildfire development board for use, you need to remove the dispresistance, otherwise the screen will not display after the development board is reset;
Connected to wildfire i When using the MX6ULL ARM Linux development board, you need to remove the DISP resistor and the three resistors in parallel, otherwise the development board will not run.
if you connect the punctual atomic development board for use, you need to weld the disp resistance, otherwise the screen will not display after the program runs.

P2 and P3 interface pins are described as follows:

P2 interface (compatible with atomic RGB interface) pin
description

Number| Pin name| Pin description
1| vccs| Power input pin (connect to 5V i
2| VCC5| Power input pin (connect to 5V)
3-10| RO — R7| 8-bit RED data pin
11| GND| power ground pin
12-19| Go – G7| 8-bit GREEN data pin
20| GND| power ground pin
21-28| BO — 67| 8-bit BLUE data pin
29| GND| power ground pin
30| PCLK| Pixel clock control pin
31| HSYNC| Horizontal synchronous signal control pin
32| VSYNC| Vertical synchronous signal control pin
33| DE| Data enable signal control pin
34| BL| LCD backlight control pin
35| 7P CS—| Capacitor touch screen reset pin (resistance touch screen chip selection pin)
36| TPMOSI| Data pin of IIC bus of capacitance touch screen (write data pin of SPI bus of resistance touch screen)
37| TP MISO
| Resistance touch screen SPI bus read data pin (capacitance touch screen not used)
38| TP_CLK| IIC bus clock control pin of capacitive touch screen (SPI bus clock control pin of resistance touch screen)
39| TP_PEN| Touch screen interrupt control pin
40| RST| LCD reset control pin (effective at low level)
Pin description of P3 interface (compatible with wildfire RGB
interface)

Number| Pin name| Pin description
1| TP Sa._| IIC bus clock control pin of capacitive touch screen
2| TP_SDA| Data pin of IIC bus of capacitance touch screen
3| TP_PEN| Touch screen interrupt control pin
4| TP_RST| Capacitor touch screen reset pin
5| GND| power ground pin
6| BL| LCD backlight control pin
7| DISP| LCD display enable pin (enable at high level)
8| DE| Data enable signal control pin
9| HSYNC| Horizontal synchronous signal control pin
10| VSYNC| Vertical synchronous signal control pin
11| PCLK| Pixel clock control pin
12-19| B7 — BO| 8-bit BLUE data pin
20-27| G7 — GO| 8-bit GREEN data pin
28-35| R7 — RO| 8-bit RED data pin
36| GND| power ground pin
37| vcc3.3| Power input pin (connect to 3.3V)
38| VCC3.3| Power input pin (connect to 3.3V)
39| VCC5| Power input pin (connect to 5V)
40| vccs| Power input pin (connect to 5V)

Hardware Configuration

The hardware circuit of the LCD module consists of ten parts: backlight control circuit, screen resolution selection circuit, 40pin display interface, drain circuit, P2 user interface, P3 user interface, capacitive   touch screen interface circuit, resistance touch screen control circuit,Touch screen selection circuit and power supply circuit.

  1. The backlight control circuit is used to provide backlight voltage to display screen and adjust backlight brightness.
  2. The screen resolution selection circuit is used to select the display type (distinguished according to the resolution). Its principle is to connect pull-up or pull-down resistors on R7, G7 and B7 data lines respectively, and then determine the resolution of thedisplay screen used by reading the status of the three data lines (equivalent to reading  the display screen ID), so as to select different configurations. In this way, a test  example can be compatible with multiple displays in software. Of course, the module only supports one resolution, so the resistance of R7, G7 and B7 data lines is fixed.
  3. The 40pin display interface is used to access and control the display screen.
  4. The drain circuit is used to balance the data line impedance between the display and the user interface.
  5. P2, P3 user interface is used for external development board.
  6. Capacitive touch screen interface circuit is used to intervene capacitive touch screen and control IIC pin pull-up.
  7. The resistance touch screen control circuit is used to detect the touch signal and collect the coordinate data of the touch screen, and then carry out ADC conversion.
  8. The touch screen selection circuit is used to select the connected touch screen and switch through welding resistance.
  9. The power circuit is used to convert the input 5V power supply to 3.3V.

working principle

Introduction to RGB LCD
High resolution and large size display screen generally does not have MCU screen interface, all adopt RGB interface, which is RGB LCD. This LCD has no built-in control IC and no built-in video memory, so it needs external controller and video memory.

The general RGB LCD has 24 color data lines (R, G, B each 8) and De, vs, HS, PCLK four control lines. It  is driven by RGB mode, which generally has two driving modes: de mode and HV mode. In de mode, de signal is used to determine valid data (when De is high / low, data is valid), while in HV mode, row synchronization and field synchronization are required to represent the rows and columns of scanning. The row scan sequence diagram of de mode and HV mode is shown in the following figure:
working principle

It can be seen from the figure that the time sequence of de mode and HV mode is basically the same. De signal (DEN) is required for den mode, while de signal is not required for HV mode. The HSD in the figure is the HS signal, which is used for line synchronization. Note: in de mode, the HS signal can not be used, that is, the LCD can still work normally without receiving the HS signal. thpw is the effective signal pulse width of horizontal synchronization, which is used to indicate the beginning of a line of data; thb is the horizontal back corridor, which represents the number of pixel clocks from the horizontal effective signal to the effective data output; thfp is the horizontal front corridor, which indicates the number of pixel clocks from the end of a row of data to the beginning of the next horizontal synchronization signal.
The vertical scanning sequence diagram is as follows:
working principle

VSD is vertical synchronous signal;
HSD is the horizontal synchronous signal;
DE is data enable signal;
tvpw is the effective signal width of vertical synchronization, which is used to indicate the beginning of a frame of data;
tvb is the vertical rear corridor, which represents the number of invalid lines after the vertical synchronization signal;
tvfp is a vertical front corridor, which indicates the number of invalid lines after the end of one frame data output and before the start of the next vertical synchronization signal;
As can be seen from the figure, a vertical scan is exactly 480 effective De pulse signals. Each de clock cycle scans one line, and a total of 480 lines are scanned to complete the display of a frame of data. This is the scan sequence of 800 * 480 LCD panel.
The timing of other resolution LCD panels is similar.

Instructions for use

STM32 instructions

Wiring instructions:
See the interface description for pin assignments.

Wiring is carried out in two steps:

A. Use 40pin flexible cable to connect the RGB interface on the display module.
Among them, P2 interface is compatible with punctual atomic development board, and P3 interface is compatible with wildfire development board (as shown in Picture 4, the connection method of P3 interface is the same as that of P2 interface).
**Picture 4. Connect RGB display module

Wiring instructions
Wiring instructions
Wiring instructions
B. After the display module is connected successfully, connect the other end of the flexible cable to the development board (as shown in Picture 5 and Picture 6). It should be noted that the flat cable should not be inserted reversely, so that the 1 ~ 40 pins of the display module interface and the 1 ~ 40 pins of the development board interface should be connected one by one.
Picture 5. Connect atomic core development board
Wiring instructions
Picture 6. Connect wildfire core development board**
Wiring instructions

Operating Steps:

A. Connect the LCD module and the STM32 MCU according to the above wiring instructions, and power on;
B. Select the STM32 test program to be tested, as shown below:
(Test program description please refer to the test program description document in the test package)
Operating
C. Open the selected test program project, compile and download;
detailed description of the STM32 test program compilation and download can be found in the following document:
http://www.lcdwiki.com/res/PublicFile/STM32_Keil_Use_Illustration_EN.pdf
D. If the LCD module displays characters and graphics normally, the program runs successfully;

Software Description

Code Architecture

A. C51 and STM32 code architecture description
The code architecture is shown below:
Software Description
The Demo API code for the main program runtime is included in the test code;
LCD initialization and related bin parallel port write data operations are included in the LCD code;
Drawing points, lines, graphics, and Chinese and English character display related operations are included in the GUI code;
The main function implements the application to run;
Platform code varies by platform;
Touch screen related operations are included in the touch code, Including resistance touch and capacitance touch;
The key processing related code is included in the key code;
The code related to the led configuration operation is included in the led

touch screen calibration instructions

A. STM32 test program touch screen calibration instructions
The STM32 touch screen calibration program automatically recognizes whether calibration is required or manually enters calibration by pressing a button.
It is included in the touch screen test item. The calibration mark and calibration parameters are saved in the AT24C02 flash. If necessary, read from the flash. The calibration process is as shown below:
Software Description

Common software

This set of test examples requires the display of Chinese and English, symbols and pictures, so the modulo software is used. There are two types of modulo software:
Image2Lcd and PCtoLCD2002. Here is only the setting of the modulo software for the test program.
The PCtoLCD2002 modulo software settings are as follows:
Dot matrix format select Dark code the modulo mode select the progressive mode
Take the model to choose the direction (high position first)
Output number system selects hexadecimal number
Custom format selection C51 format
The specific setting method is as follows:
http://www.lcdwiki.com/Chinese_and_English_display_modulo_settings
Image2Lcd modulo software settings are shown below:
Common software

The Image2Lcd software needs to be set to horizontal, left to right, top to bottom, and low position to the front scan mode.

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals