View Full Version : PSC get position command

Peter Verkaik
04-30-2006, 06:21 AM
The psc manual states
Syntax: “!SCRSP” x $0D
Reply: x y z(where x is the channel number, and z:y is the value reported)
The basic stamp example in the manual says
SEROUT Sdat, Baud+$8000, ["!SCRSP", ch, CR]
SERIN Sdat, Baud, 1000, Init,[STR Buff\3]
DEBUG "Servo ", DEC buff(0), " ", HEX2 buff(1), " :", HEX2 buff(2), CR

which would indicate the position is y:z (and not z:y)

Can anyone tell what the correct byte order of the position value is?

regards peter

Peter Verkaik
04-30-2006, 06:52 PM
I found a bs1 program that confirms
the get position command returns the position
highbyte before the lowbyte, which is the reverse
order as stated in the manual. The example
in the manual is therefore correct.

regards peter