Как настроить последовательный дисплей

The serial port control screen is based on the LCD screen with a control board added. The control board has an MCU and a screen driver chip. The upper computer can control the display by sending instructions through RS232/RS485, which makes customers do not need to spend energy learning how to use the screen. can achieve the desired effect

Provide your requirements for the serial control panel

Provide the display screen size, overall size of the driver board, communication interface, operation interface and other information you need, and we will design drawings according to your requirements for your confirmation

Confirm communication protocol

The serial port control display communicates with the host computer through RS232/RS485 and other interfaces, we will provide a communication protocol according to your operation interface, and display the content you want according to the content of the protocol

Communication test between the serial port control panel and your device

What are the contents of the communication protocol?

serial control LCD

The communication protocol includes the physical interface and software settings, as well as the format and content of each instruction. Below is a part of the agreement of a mass-produced project, which may be useful to you

communication protocol

1.Protocol description

Physical layer: RS232

Wave rate: 9600bps

Data bits: 8

stop bits: 1

check: no check

2.Protocol

2.1 Message format

Frame:1Byte,header:2Byte,Length Command:1Byte,Data:nBytes,Check Frame:1Byte, tail:1Byte

Frame header: 0x7A

Length: including “length”, “command” and “data”

Command: the operation sent to the display

Data: the information carried by the command

Check: the lowest byte of the sum of the three items of data “length”, “command” and “data”

Frame end: 0x78

2.2 Data Types

Data Type Description and Requirements

BYTE Unsigned single-byte integer (1 byte, 8 bits)

WORD Unsigned double-byte integer (2 bytes, 16 bits)

DWORD Unsigned four-byte integer (4 bytes, 32 bits)

STRING GBK encoding

2.3 Command description

2.3.1 Display heartbeat【0x01】

    Command description: 0x01

Data direction: display screen—>power exchange cabinet

    Sending method: sending at intervals of 1 second

Data description:

No. Description Data type Remarks

1 Heartbeat sequence number BYTE Range: 0-255

2.3.2 Cabinet information【0x02】

Command description: 0x02

Data direction: power exchange cabinet —> display screen

Sending method: sending at intervals of 1 second

Data description:

No. Description Data type Remarks

1 Number of cabinet doors BYTE Range: 1-16

2 Cabinet ID length BYTE Range: 0-12

3 Enclosure ID STRING

4 Device status BYTE 0: offline 1: online

5 Signal strength BYTE Range: 0-31

6 Cabinet power WORD Accuracy kW

7 Cabinet voltage WORD accuracy 0.1V

8 Cabinet current WORD accuracy 0.1A

9 Cabinet temperature WORD Indicates the range: -50 degrees +120 degrees

More than 50 means + temperature

50 means 0 degrees

Below 50 means – temperature

10 Cabinet time BYTE[7] BYTE[0-1]: year

BYTE[2]: month

BYTE[3]: day

BYTE[4]: hour

BYTE[5]: minutes

BYTE[6]: seconds

2.3.3 Battery information【0x03】

Command description: 0x03

Data direction: power exchange cabinet —> display screen

Sending method: sending at intervals of 1 second

Sending method: sending at intervals of 2 seconds

Data description:

No. Description Data type Remarks

1 Door number BYTE Range: 0-16

2 Warehouse door temperature WORD Indicates the range: -50 degrees +120 degrees

More than 50 means + temperature

50 means 0 degrees

Below 50 means – temperature

3 Whether there is a battery or not BYTE 0: No battery exists 1: There is a battery

4 Battery disabled flag BYTE 0: Not disabled 1: Disabled

5 Battery specification BYTE[2] BYTE[0]: voltage level

BYTE [1]: Ann. Hour

6 battery voltage WORD accuracy 0.1V

7 battery current WORD accuracy 0.1A

8 battery temperature WORD Indicates the range: -50 degrees +120 degrees

More than 50 means + temperature

50 means 0 degrees

Below 50 means – temperature

9 Battery SOC BYTE Range: 0-100

10 battery code length BYTE range: 0-64

11 battery code STRING

2.3.4 Text information [0x04]

Command description: 0x04

Data direction: power exchange cabinet —> display screen

Sending method: one-time sending

3.protocol example

Protocol data frame bytes are represented by Hex.

Data Frame:

7a 00 20 02 0c 0a 38 30 30 30 30 30 30 30 39 39 01 1e 01 07 09 3e 00 bd 00 26 14 16 03 02 0a 37 20 13 78

Parse:

Frame header: 7a

Length: 00 20 (32)

Command: 02

Number of cabinet doors: 0c

Cabinet code length: 0a

Cabinet ID: 38 30 30 30 30 30 30 30 39 39 (8000000099)

Device status: 01 (Online)

Signal Strength: 1e (0x1e=30)

Cabinet electrical degree: 01 07 (0x0107=263 means 26.3 degrees)

Cabinet voltage: 09 3e (0x093e=2366 means 236.6V)

Cabinet current: 00 bd (0x00bd =189 means 18.9A)

Cabinet temperature: 00 26 (0x0026 =38-50 means -12 degrees)

Cabinet time: 14 16 03 02 0a 37 20 (2022-03-02 10:55:23)

checksum: 13

End of frame: 78

Прокрутка к началу