ROBOT . HEAD to TOE
Product User’s Manual –
Shield-Servo
7.2 Shield-Servo UART Protocol
If you are using the UART protocol to control Shield-Servo, both computer and microcontroller
are actually sending serial command to Shield-Servo. This section explains the protocol for
send/receive commands.
Shield-Servo has two types of protocol, the 1st protocol is important which is uses to send
command to Shield-Servo, further control a particular servo to a position with a defined speed.
2nd protocol is for host to request the current position of servo. The 2nd protocol is alternative to
user, if position reporting is not requirement, it can be ignored.
NO
COMMAND
DESCRIPTION
PROTOCOL
BYTE
SEND/
RECEIVE
DATA (8-BIT)
BINARY
DECIMAL
HEXI
1
Mode+Servo
channel (0 to
active all)
Turn OFF the Servo
1
st
Byte
send
110XXX
XX
193-200
C1-C8
0 = deactive
servo
1
st
Byte
send
00000000
0
00
2
Mode+Servo
channel (0 to
active all)
Turn ON the Servo motor.
1
st
Byte
send
110XXX
XX
193-200
C1-C8
1 = activate
servo
1
st
Byte
send
00000001
1
01
3
Mode+Servo
channel (0 to
active all)
Position and speed
command
Send: 4 byte
2nd and 3rd byte
combinedto provided 13 bit
data of servo position
0-8000.
1
st
Byte
send
111XXX
XX
224-232
E1-E8
Position Higher
7 bits
2
nd
Byte
send
0XXXXX
XX
0-127
00-7F
Position Lower 6
bits
3
rd
Byte
send
00XXXX
XX
0-63
00-3F
Speed (0-100)
4
st
Byte
send
0XXXXX
XX
0-100
00-64
4
Mode+Servo
channel (0 to
active all)
Servo position reporting
command
1
st
Byte
send
101XXX
XX
161-168
A1-A8
Position Higher
7 bits
2
nd
Byte
receive
Higher 7 bits
Position Lower 6
bits
3
rd
Byte
receive
Lower 6 bits
5
Mode+Servo
channel (0 to
active all)
Servo starting position
command
1
st
Byte
send
100XXX
XX
129-136
81-88
Position Higher
7 bits
2
nd
Byte
send
Higher 7 bits
Position Lower 6
bits
3
rd
Byte
send
Lower 6 bits
Shield-Servo
reply
4
th
Byte
receive
0x04
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
20