Serial communication format - makerbase-mks/MKS-SERVO42C GitHub Wiki
Applicable to MKS-SERVO42C-V1.1
-
The sending and receiving settings of the serial port assistant are hex, and command bytes are not prefixed with 0x.
-
The serial communication baud rate of the driver board 38400 is set on the UartBaud option
-
The serial ID(ex) of the driver board is set on the UartAddr option.
Default : e0
-
For each command, do not send less or omit a parameter.
-
The returned data format is the high 8 bits first.
-
Returning ID 01 means that the command is correct, and returning ID 00 means that the command is wrong.
-
Verification:
The last 1 byte is the sending check value tCHK or the receiving check value rCHK.
The check value is the low byte of the sum of all bytes.
E.g:
- send "e0 30 tCHK" tCHK = (0xe0 + 0x30) & 0xFF = 0x110 & 0xFF = 0x10
- receive "e0 01 rCHK" rCHK = (0xe0 + 0x01) & 0xFF = 0xe1 & 0xFF = 0xe1