User`s manual

ROBOT . HEAD to TOE
Product User’s Manual – SC08A
Position and Speed Command
Both computer and microcontroller actually send command to SC08A serially. This section
explains the protocol to send command.
a) The command is being sent in packet format. Each packet consists of 4 bytes.
i. 1
st
byte: Mode + Servo motor channel
ii. 2
nd
byte: Position (Higher 7 bit)
iii. 3
rd
byte: Position (Lower 6 bit)
iv. 4
th
byte: Speed (0-100)
b) SC08A translate four bytes of data into three parameter:
Byte Binary Hexadecimal Decimal
1st Byte 0b111XXXXX 0xE0 to 0xFF 224 to 255
2nd Byte 0b0XXXXXXX 0x00 to 0x7F 0 to 127
3rd Byte 0b00XXXXXX 0x00 to 0x3F 0 to 63
4th Byte 0b0XXXXXXX 0x00 to 0x64 0 to 100
i. 1
st
byte is combination of mode and servo motor channel. Servo motor channel
is from 0-16. Select '0' to activate all servo motor from channel 1 to 8(if single
SC08A used) or 1 to 16 (if double SC08A used).
0b 1 1 1 x x x x x
ii. 2
nd
and 3
rd
byte combined to provide 13 bit data of servo position, 0-8000. The
resolution of SC08A is 0.5us. It will start from 0.5ms and increase the duty
cycle of pulses according to value of Position. Thus, following formula show
the duty cycle of pulses generated:
Duty cycle = (resolution x Servo Position) + 0.5ms
= (0.5us x Servo Position) + 0.5ms
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
23
Mode for position and
speed command
Servo motor channel