Surenoo Smc0240a-240320 Series Mcu Interface Tft Lcd Module User Manual

Surenoo Smc0240a-240320 Series Mcu Interface Tft Lcd Module User Manual

Surenoo-logo

Surenoo SMC0240A-240320 Series MCU Interface TFT LCD Module

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-product-image

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-1

Shenzhen Surenoo Technology Co.,Ltd.
www.surenoo.com
Skype: Surenoo365

Reference Controller Datasheet
MCU Interface LCD Module Selection Guide
ILI9341

Product Description

The product is a 2.4-inch TFT LCD module ,it has the 320×240 resolution and supports 16BIT RGB 65K color display, the internal driver IC is ILI9341. Its hardware supports 8-bit and 16-bit parallel port data bus mode switching, the default use 16-bit parallel port data bus mode. The module includes LCD display, resistive touch screen, SD card slot and PCB backplane. It can be Insert directly the STM32 series development board and supports SD card expansion.

Product Features

  • 2.4-inch color screen, support 16BIT RGB 65K color display, display rich colors
  • 240×320 resolution for clear display
  • Support 8-bit and 16-bit parallel data bus mode switching, default 16-bit parallel bus transmission, fast transmission speed
  • Supports ALIENTEK STM32 Mini, Elite, WarShip, Explorer, and Apollo development boards for direct plug-in use
  • Support for touch function
  • Support SD card function expansion
  • Provides a rich sample program for STM32 and C51 platforms
  • Military-grade process standards, long-term stable work
  • Provide underlying driver technical support

Product Parameters

NameDescription
Display ColorRGB 65K color
SKUMRB2408
Screen Size2.4(inch)
Screen TypeTFT
Driver ICILI9341
Resolution320*240 (Pixel)
Module Interface8bit or 16Bit parallel interface
Active Area48.96*36.72(mm)
Touch Screen Typeresistive touch screen
Touch ICXPT2046
Module PCB Size44.25×76.00 (mm)
Operating Temperature-20℃~70℃
Storage Temperature-40℃~70℃
Operating Voltage3.3V / 5V
Power ConsumptionTBD
Product WeightTBD

Interface Description

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-2

Picture1. Module Pin silk screen picture

Note: 

  1. The module hardware supports 8-bit and 16-bit parallel port data bus mode switching (as sho wn by the red box in Picture 1 ab ove), as follows:
    • Solder R1 with 0Ω resistor or short circuit directly, and disconnect R2:
      Select 16-bit parallel port data bus mode, use D1~D8, D10~D17 data pins
    • Solder R2 with 0Ω resistor or short circuit directly, and disconnect R1:
      Select 8-bit parallel port data bus mode, use D10~D17 data pins

Important Note:

  1. The following pin numbers 1~34 are the pin number of Module pin with PCB backplane of our company. If you purchase a bare screen, please refer to the pin definition of the bare screen specification, refer to the wiring according to the signal type instead of directly Wire according to the following module pin numbers. For example: CS is 1 pin on our module. It may be x pin on different size bare screen.
  2. About VCC supply voltage: If you buy a module with PCB backplane, VCC/VDD power supply can be connected to 5V or 3.3V (module has integrated ultra low dropout 5V to 3V circuit), but it is recommended to connect 3.3V, because connecting 5V will lead to circuit Increased heat generation, affecting module life; if you buy a bare screen LCD, remember to only connect 3.3V.
  3. About the backlight voltage: The module with the PCB backplane has integrated triode backlight control circuit, which only needs to input the high level of the BL pin or the PWM wave to illuminate the backlight. If you are buying a bare screen, the LEDAx is connected to 3.0V-3.3V and the LEDKx is grounded.
NumberModule PinPin Description
1CSLCD reset control pin( low level enable)
2RSLCD register / data selection control pin (high level: register, low level: data)
3WRLCD write control pin
4RDLCD read control pin
5RSTLCD reset control pin( low level reset)
6D1LCD data bus low 8-bit pin(If 8-bit mode is
7D2selected, the lower 8-bit data pins are not used.)
8D3
9D4
10D5
11D6
12D7
13D8
14D10LCD data bus high 8-bit pin
15D11
16D12
17D13
18D14
19D15
20D16
21D17
22SCSSD card selection control pin (used when using the SD card expansion function, this test program is not used)
23BLLCD backlight control pin(High level light)
24VDDModule power positive pin (module has integrated voltage regulator IC, so the power supply can be connected to 5V or 3.3V)
25VDD
26GNDModule power ground pin
27GND
28V5LCD backlight power positive pin (default shared onboard backlight power supply, this pin can not be connected)
29MOTouch screen SPI bus data input pin
30MITouch screen SPI bus data output pin
31PENTouch screen interrupt detection pin (Low level when a touch occurs)
32FCSFlash chip select control pin (used when using the Flash extension function, this test program is not used)
33TCSTouch screen IC chip select control pin(Low level enable)
34CLKTouch screen SPI bus clock control pin

Hardware Configuration

The LCD module hardware circuit comprises five parts: an LCD display control circuit, a resistive touch screen sampling circuit, an SD card interface circuit, a Data bus mode switching circuit and a backlight control circuit.
LCD display control circuit for controlling the pins of the LCD, including control pins and data transfer pins.
The resistive touch screen sampling circuit is used for detecting a touch event, performing AD conversion on the touch data, and transmitting touch coordinate values.
SD card control circuit is used for SD card function expansion, controlling SD card identification, reading and writing.
Data bus mode switching circuit for switching 8-bit or 16-bit parallel port data bus mode switching.
Backlight control circuit for controlling backlight brightness and power supply selection.

Working principle

Introduction to ILI9341 Controller
The ILI9341 controller supports a maximum resolution of 240*320 and has a 172800-byte GRAM. It also supports 8-bit, 9-bit, 16-bit, and 18-bit parallel port data buses. It also supports 3-wire and 4-wire SPI serial ports. Since the supported resolution is relatively large and the amount of data transmitted is large, the parallel port transmission is adopted, and the transmission speed is fast. ITI9341 also supports 65K, 262K RGB color display, display color is very rich, while supporting rotating display and scroll display and video playback, display in a variety of ways.
The ILI9341 controller uses 16bit (RGB565) to control a pixel display, so it can display up to 65K colors per pixel. The pixel address setting is performed in the order of rows and columns, and the incrementing and decreasing direction is determined by the scanning mode. The ILI9341 display method is performed by setting the address and then setting the color value.

Introduction to parallel port communication
The parallel port communication write mode timing is as shown below:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-3

The timing of the parallel port communication read mode is shown in the figure below:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-4

CSX is a chip select signal for enabling and disabling parallel port communication, active low
RESX is an external reset signal, active low
D/CX is the data or command selection signal, 1-write data or command parameters, 0-write command
WRX is a write data control signal
RDX is a read data control signal
D[X:0] is a parallel port data bit, which has four types: 8-bit, 9-bit, 16-bit, and 18-bit.
When performing a write operation, on the basis of the reset, first set the data or command selection signal, then pull the chip select signal low, then input the content to be written from the host, and then pull the write data control signal low. When pulled high, data is written to the LCD control IC on the rising edge of the write control signal. Finally, the chip select signal is pulled high and a data write operation is completed.
When entering the read operation, on the basis of the reset, first pull the chip select signal low, then pull the data or command select signal high, then pull the read data control signal low, and then read the data from the LCD control IC. And then The read data control signal is pulled high, and the data is read out on the rising edge of the read data control signal. Finally, the chip select signal is pulled high, and a data read operation is completed.

Instructions for use

STM32 instructions
Wiring instructions:
See the interface description for pin assignments.

Note: 

  1. This module can be directly inserted into the TFTLCD slot of the punctual atom development board, no manual wiring is required.
  2. The following internal plug-in pins of the corresponding MCU refer to the MCU pins directly connected to the TFTLCD slot inside the development board, only for reference.
MiniSTM32 development board TFTLCD socket in-line instructions
NumberModule PinCorresponding TFTLCD socket pinCorresponding to STM32F103RCT6 microcontroller internal connection pin
1CSCSPC9
2RSRSPC8
3WRWRPC7
4RDRDPC6
5RSTRSTPC4
6D1D0PB0
7D2D1PB1
8D3D2PB2
9D4D3PB3
10D5D4PB4
11D6D5PB5
12D7D6PB6
13D8D7PB7
14D10D8PB8
15D11D9PB9
16D12D10PB10
17D13D11PB11
18D14D12PB12
19D15D13PB13
20D16D14PB14
21D17D15PB15
22SCSNot usedGND
23BLBLPC10
24VDD3.33.3V
25VDD3.33.3V
26GNDGNDGND
27GNDGNDGND
28V5Not used5V
29MOMISOPC2
30MIMOSIPC3
31PENPENPC1
32FCSNot usedNC
33TCSTCSPC13
34CLKCLKPC0
Elite STM32 development board TFTLCD socket in-line instructions
Number 

Module Pin

Corresponding TFTLCD socket pinCorresponding to STM32F103ZET6 microcontroller internal connection pin
1CSCSPG12
2RSRSPG0
3WRWRPD5
4RDRDPD4
5RSTRSTreset pin
6D1D0PD14
7D2D1PD15
8D3D2PD0
9D4D3PD1
10D5D4PE7
11D6D5PE8
12D7D6PE9
13D8D7PE10
14D10D8PE11
15D11D9PE12
16D12D10PE13
17D13D11PE14
18D14D12PE15
19D15D13PD8
20D16D14PD9
21D17D15PD10
22SCSNot usedGND
23BLBLPB0
24VDDVDD3.3V
25VDDVDD3.3V
26GNDGNDGND
27GNDGNDGND
28V5Not used5V
29MOMISOPB2
30MIMOSIPF9
31PENPENPF10
32FCSNot usedNC
33TCSTCSPF11
34CLKCLKPB1
WarShip STM32 development board TFTLCD socket in-line instructions
NumberModule PinCorresponding TFTLCD socket pinCorresponding to STM32F103ZET6 microcontroller internal connection pin
V2V3
1CSCSPG12
2RSRSPG0
3WRWRPD5
4RDRDPD4
5RSTRSTreset pin
6D1D0PD14
7D2D1PD15
8D3D2PD0
9D4D3PD1
10D5D4PE7
11D6D5PE8
12D7D6PE9
13D8D7PE10
14D10D8PE11
15D11D9PE12
16D12D10PE13
17D13D11PE14
18D14D12PE15
19D15D13PD8
20D16D14PD9
21D17D15PD10
22SCSNot usedGND
23BLBLPB0
24VDDVDD3.3V
25VDDVDD3.3V
26GNDGNDGND
27GNDGNDGND
28V5Not used5V
29MOMISOPF8PB2
30MIMOSIPF9
31PENPENPF10
32FCSNot usedNC
33TCSTCSPB2PF11
34CLKCLKPB1
Explorer STM32F4 development board TFTLCD socket in-line instructions
NumberModule PinCorresponding TFTLCD socket pinCorresponding to STM32F407ZGT6 microcontroller internal connection pin
1CSCSPG12
2RSRSPF12
3WRWRPD5
4RDRDPD4
5RSTRSTreset pin
6D1D0PD14
7D2D1PD15
8D3D2PD0
9D4D3PD1
10D5D4PE7
11D6D5PE8
12D7D6PE9
13D8D7PE10
14D10D8PE11
15D11D9PE12
16D12D10PE13
17D13D11PE14
18D14D12PE15
19D15D13PD8
20D16D14PD9
21D17D15PD10
22SCSNot usedGND
23BLBLPB15
24VDDVDD3.3V
25VDDVDD3.3V
26GNDGNDGND
27GNDGNDGND
28V5Not used5V
29MOMISOPB2
30MIMOSIPF11
31PENPENPB1
32FCSNot usedNC
33TCSTCSPC13
34CLKCLKPB0
Apollo STM32F4/F7 development board TFTLCD socket in-line instructions
NumberModule PinCorresponding TFTLCD socket pinCorresponding to STM32F429IGT6STM32F767IGT6STM32H743IIT6 microcontroller internal connection pin
1CSCSPD7
2RSRSPD13
3WRWRPD5
4RDRDPD4
5RSTRSTreset pin
6D1D0PD14
7D2D1PD15
8D3D2PD0
9D4D3PD1
10D5D4PE7
11D6D5PE8
12D7D6PE9
13D8D7PE10
14D10D8PE11
15D11D9PE12
16D12D10PE13
17D13D11PE14
18D14D12PE15
19D15D13PD8
20D16D14PD9
21D17D15PD10
22SCSNot usedGND
23BLBLPB5
24VDDVDD3.3V
25VDDVDD3.3V
26GNDGNDGND
27GNDGNDGND
28V5Not used5V
29MOMISOPG3
30MIMOSIPI3
31PENPENPH7
32FCSNot usedNC
33TCSTCSPI8
34CLKCLKPH6

Operating Steps: 

  • Connect the LCD module(As shown in Picture 1) and the STM32 MCU according to the above wiring instructions, and power on;
  • Select the C51 test program to be tested, as shown below: (Test program description please refer to the test program description document in the test package)

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-5

 

C51 instructions
Wiring instructions:

See the interface description for pin assignments.

STC12C5A60S2 microcontroller test program wiring instructions
NumberModule PinCorresponding to STC12 development board wiring pin
1CSP13
2RSP12
3WRP11
4RDP10
5RSTP33
6D1P00
7D2P01
8D3P02
9D4P03
10D5P04
11D6P05
12D7P06
13D8P07
14D10P20
15D11P21
16D12P22
17D13P23
18D14P24
19D15P25
20D16P26
21D17P27
22SCSNo need to connect
23BLP32
24VDD3.3V/5V
25VDD3.3V/5V
26GNDGND
27GNDGND
28V5No need to connect
29MOP35
30MIP34
31PENP40
32FCSNo need to connect
33TCSP37
34CLKP36
STC89C52RC microcontroller test program wiring instructions
Number 

Module Pin

Corresponding to STC89 development board

wiring pin

1CSP13
2RSP12
3WRP11
4RDP10
5RSTP14
6D1P30
7D2P31
8D3P32
9D4P33
10D5P34
11D6P35
12D7P36
13D8P37
14D10P20
15D11P21
16D12P22
17D13P23
18D14P24
19D15P25
20D16P26
21D17P27
22SCSNo need to connect
23BL3.3V
24VDD3.3V/5V
25VDD3.3V/5V
26GNDGND
27GNDGND
28V5No need to connect
29MONo need to connect
30MINo need to connect
31PENNo need to connect
32FCSNo need to connect
33TCSNo need to connect
34CLKNo need to connect

Note: 

  1. Since the STC89C52RC microcontroller does not have a push-pull output function, the backlight control pin needs to be connected to a 3.3V power supply to be properly lit.
  2. Since the STC89C52RC microcontroller’s Flash capacity is too small (less than 25KB), the program with touch function cannot be downloaded, so the touch screen does not need wiring.

Operating Steps: 

  • Connect the LCD module (As shown in Picture 1)and the C51 MCU according to the above wiring instructions, and power on;
  • Select the C51 test program to be tested, as shown below:
    (Test program description please refer to the test program description document in the test package)

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-6

Software Description

Code Architecture
C51 and STM32 code architecture description The code architecture is shown below:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-7

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;  The key processing related code is included in the key code (the C51 platform does  not have a button processing code);  The code related to the led configuration operation is included in the led code(the  C51 platform does not have a led processing code);

GPIO definition description
STM32 test program GPIO definition description
The GPIO definition of the LCD screen of the STM32 test program is placed in the lcd.h file, which is defined in two ways:

  1. STM32F103RCT6 microcontroller test program uses IO analog mode (it does not support FSMC bus)
  2. Other STM32 MCU test programs use FSMC bus mode

STM32F103RCT6 MCU IO analog test program LCD screen GPIO definition as shown below:
Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-8FSMC test program lcd screen GPIO is defined as shown below (take  STM32F103ZET6 microcontroller FSMC test program as an example):

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-9

The GPIO definition related to the STM32 touch screen is placed in the touch file as shown below (take the STM32F103RCT6 microcontroller IO simulation test program  as an example):

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-10C51 test program GPIO definition description
C51 test program lcd screen GPIO definition is placed in the lcd.h file, as shown below(Taking the STC12C5A60S2 microcontroller test program as an example):

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-11

Parallel pin definition needs to select the whole set of GPIO port groups, such as P0, P2, etc., so that when transferring data, the operation is convenient.Other pins can be  defined as any free GPIO.  The touch screen related GPIO definition is placed in the touch.h file, as shown below  (take the STC12C5A60S2 microcontroller test program as an example):

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-13

The GPIO definition of the touch screen can be modified and can be defined as any other free GPIO.
If the microcontroller does not have a P4 GPIO group, penirq can be defined as other GPIOs.

Parallel port communication code implementation
A. STM32 test program parallel port communication code implementation
The STM32 test program parallel port communication code is placed in the LCD.c file, which is implemented in two ways:

  1. STM32F103RCT6 microcontroller test program uses IO analog mode (it does not support FSMC bus)
  2. Other STM32 MCU test programs use FSMC bus mode

The IO simulation test program is implemented as shown below:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-14

The FSMC test program is implemented as shown below:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-15

Both 8- and 16-bit command writes and 8- and 16-bit data writes and reads are implemented.

C51 test program parallel port communication code implementation The relevant code is implemented in the LCD.c file as shown below:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-16

Implemented 8-bit and 16-bit commands and 8-bit and 16-bit data write and read.

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:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-17

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-1718

C51 test program touch screen calibration instructions
The C51 touch screen calibration needs to execute the Touch_Adjust test item (only  available in the STC12C5A60S2 test program), as shown below: C51 test program touch screen calibration instructions

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-18

After the touch calibration is passed, you need to save the calibration parameters displayed on the screen in the touch.c file, as shown below:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-19

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:

Surenoo-SMC0240A-240320-Series-MCU-Interface-TFT-LCD-Module-20

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

www.surenoo.com

References

Documents / Resouces

Download manual
Here you can download full pdf version of manual, it may contain additional safety instructions, warranty information, FCC rules, etc.


Related Manuals