
User Guide
©2008
-2021 Seeed Technology Co., Ltd. All rights reserved. solution.seeedstudio.com
20
/
22
Slave Response: 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
Example: Write Register 0x0020,that is set temperature compensation
Request: 01 06 0020 0000 8800
Slave Addr.
1 byte
0x01
Function Code
1 byte
0x06
Register Addr.
2 byte
0x0020 (High8bits first)
Register Value
2 byte
0x0000 (High8bits first)
Checksum
2 byte
0x8800
Response:01 06 0021 0001 1800
Slave Addr.
1 byte
0x01
Function Code
1 byte
0x06
Register Addr.
2 byte
0x0020 (High8bits first)
Register Value
2 byte
0x0000 (High8bits first)
Checksum
2 byte
0x8800
7.4.4 Function Code 16 Protocol Example
Master Request: AA 10 RRRR NNNN MM VVVV1 VVVV2 …CCCC
AA
1 byte
Slave Address,0-255
0x10
1 byte
Function Code 0x10
RRRR
2 byte
Starting Register Addr
NNNN
2 byte
Quantity of Register to write
MM
1 byte
Register Data Byte Count
VVVV1
2 byte
Register Value(High8bits first)
VVVV2
2 byte
Register Value(High8bits first)
…
…
Register Value(High8bits first)
CCCC
2 byte
CRC CHECKSUM