
User Guide
©2008
-2021 Seeed Technology Co., Ltd. All rights reserved. solution.seeedstudio.com
19
/
22
Example: Read register 0x0000-0x0002,that is temperature, reserved, and EC.
Master Request:01 04 0000 0003 B00B
Slave Addr.
1 byte
0x01
Function Code
1 byte
0x04
Starting Register
Addr.
2 byte
0x0000
Quantity of Register
to read
2 byte
0x0003
Checksum
2 byte
0xB00B
Slave Response: 01 04 06 08 16 00 00 05 78 2B 6A
Slave Addr.
1 byte
0x01
Function Code
1 byte
0x04
Register Data Byte
Count
1 byte
0x06
Register Value:
Temperature
2 byte
0x08(HIGH 8 Bits)
0x16(LOW8 Bits)
Register Value:
Reserved
2 byte
0x00(HIGH 8 Bits)
0x00(LOW8 Bits)
Register Value: EC
2 byte
0x05(HIGH 8 Bits)
0x78(LOW8 Bits)
Checksum
2 byte
0xD257
Temperature =(0x08*256+0x 16)/100=2070/100=20.70 °C
EC=0x05*256+0x78=5*256+120 =1400 us/cm
7.4.3 Function Code 6 Protocol Example
Master Request: AA 06 RRRR VVVV CCCC
AA
1 byte
Slave Address,0-255
0x06
1 byte
Function Code 6
RRRR
2 byte
Register Addr (High8bits first)
VVVV
2 byte
Register Value (High8bits first)
CCCC
2 byte
CRC CHECKSUM