# Help - not understanding serial protocol numbers

Hi there - I am a newbie to the Maestro serial protocols. I am sending commands from a PIC to the Maestro 6 and its working fine but I am not understanding the numbers that are being used in your examples.

The manual says set the position in quarter micro-seconds. So (for the Compact Protocol) if you setting the position to 1500us would be 1500 x 4 = 6000 = 0x1770h. But the manual doesn’t do this math for you and says to send 0x2E70h for the data. I have looked at this 10 different ways and I don’t understand where the 0x2E70 comes from - can someone explain?

Also it says that for the databytes the msb has to be low…so what do you do if have a databyte that DOES have msb set - do you just through it our or do you shift the high byte to compensate? I would expect a bit more explanation about all of this in the manual.

Thanks,
ATX

Ok - I figured it out. The high byte is shifted one bit to the left and the msb of the low byte becomes the lsb of the high byte. A little more explanation in the manual on this would be helpful. Show an example of where all the values came from rather than just saying “to set the servo position at 1500 we send the position command, servo number followed by 0x70 then 0x2E” with no explanation on how you arrived at those values. Didn’t y’all learn to show your work in school?

Hello, ATX.

I am glad you were able to figure it out; thank you for the feedback. I am not sure which specific part of the guide you were referring to, but the “Serial Servo Commands” section of the Maestro user’s guide has an example for the Set Target command that explains where the data byte values came from.

It shows the 6000 quarter microseconds value broken down into binary, which is 01011101110000. This binary value is separated into the high bits and low bits (which in the guide is indicated by coloring the high bits green and the low bits red). This leaves you with the high bits of 0101110 and low bits of 1110000. As you stated, the MSB should be set to 0 for each of these, resulting in 00101110 and 01110000, or 0x2E and 0x70 in hex.

-Brandon

Hi Brandon - thanks for reply. I was looking in the .pdf version of what you have on online and the example you show with the explanation is exactly what I was looking for. I see it in the pdf version now as well. Here is the problem though: In section 5.c the manual describes the different protocol options and is showing the examples (set servo position) without showing where the numbers came from. The examples are not shown until section 5.e after you get through the CRC section. It might make sense to copy or move the explanation of where the numbers came from up to section 5.c where it is first discussed. No worries for me - I am off an running.

Cheers,
ATX