User Manual

Steps 1 & 2 (write as binary, least significant bit first,
add 7 zeros to the end of the message):
CRC-7 Polynomial = [1 0 0 0 1 0 0 1]
message = [1 1 0 0 0 0 0 1] [1 0 0 0 0 0 0 0] 0 0 0 0 0 0 0
Steps 3, 4, & 5:
_______________________________________________
1 0 0 0 1 0 0 1 ) 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
XOR 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | | |
--------------- | | | | | | | | | | | | | | |
1 0 0 1 0 0 0 1 | | | | | | | | | | | | | |
shift ----> 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | |
_______________ | | | | | | | | | | | | | |
1 1 0 0 0 0 0 0 | | | | | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | | | | | |
_______________ | | | | | | | | | | |
1 0 0 1 0 0 1 0 | | | | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | | | | |
_______________ | | | | | | | | | |
1 1 0 1 1 0 0 0 | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | |
_______________ | | | | | | |
1 0 1 0 0 0 1 0 | | | | | |
1 0 0 0 1 0 0 1 | | | | | |
_______________ | | | | | |
1 0 1 0 1 1 0 0 | | | |
1 0 0 0 1 0 0 1 | | | |
_______________ | | | |
1 0 0 1 0 1 0 0 | |
1 0 0 0 1 0 0 1 | |
_______________ | |
1 1 1 0 1 0 0 = 0x17
So the full command packet we would send with CRC enabled is: 0x83, 0x01, 0x17.
5.e. Serial Servo Commands
The Maestro has several serial commands for setting the target of a channel, getting its current
position, and setting its speed and acceleration limits.
Set Target (Pololu/Compact protocol)
Compact protocol: 0x84, channel number, target low bits, target high bits
Pololu protocol: 0xAA, device number, 0x04, channel number, target low bits, target high bits
The lower 7 bits of the third data byte represent bits 0–6 of the target (the lower 7 bits), while the lower
7 bits of the fourth data byte represent bits 7–13 of the target. The target is a non-negative integer.
If the channel is configured as a servo, then the target represents the pulse width to transmit in units
of quarter-microseconds. A target value of 0 tells the Maestro to stop sending pulses to the servo.
If the channel is configured as a digital output, values less than 6000 tell the Maestro to drive the line
low, while values of 6000 or greater tell the Maestro to drive the line high.
For example, if channel 2 is configured as a servo and you want to set its target to 1500 µs (1500×4 =
6000 = 01011101110000 in binary), you could send the following byte sequence:
Pololu Maestro Servo Controller User’s Guide © 2001–2017 Pololu Corporation
5. Serial Interface Page 53 of 99