
User Guide
©2008
-2021 Seeed Technology Co., Ltd. All rights reserved. solution.seeedstudio.com
18
/
22
Addr.
Quantity of Register
to read
2 byte
0x0002
Checksum
2 byte
0xC5B3
Slave Response:01 03 04 00 01 00 03 EB F2
Slave Addr.
1 byte
0x01
Function Code
1 byte
0x03
Register Data Byte
Count
1 byte
0x04
Register Value:
Address
2 byte
0x00(HIGH 8 Bits)
0x01(LOW8 Bits)
Register Value:
Baudrate
2 byte
0x00(HIGH 8 Bits)
0x03(LOW8 Bits)
Checksum
2 byte
0xEBF2
7.4.2 Function Code 4 Protocol Example
Master Request: AA 04 RRRR NNNN CCCC
AA
1 byte
Slave Address,0-255
0x04
1 byte
Function Code 4
RRRR
2 byte
Starting Register Addr
NNNN
2 byte
Quantity of Register to read
CCCC
2 byte
CRC CHECKSUM
Slave Response: AA 04 MM VV0 VV1 VV2 VV3… CCCC
AA
1 byte
Slave Address,0-255
0x04
1 byte
Function Code 4
MM
1 byte
Register Data Byte Count
VV0,VV1
2 byte
Register Value (High8bits first)
VV2,VV3
2 byte
Register Value (High8bits first)
…
…
Register Value (High8bits first)
CCCC
2 byte
CRC CHECKSUM