need help!!! BasicX24p with Parallax Servo Controller
Parallax Servo Controller Rev B (PSC-B).
The PSC-B's default baud rate of 2400 is much too slow for the project, and I need to take
advantage of the 'runtime selectable baud rate' to switch it to 38K4.
My problem is that the PSC-B is operated with a single pin for serial I/O and the BX24p
defines COM3 with one pin for input, another for output.
I can easily run the PSC at 2400 baud, because it uses only output, and the PSC-B doesn't
send anything back on the output pin.
However, changing the baud rate with an SBR command, causes the PSC-B to send a
confirmation message back on the serial line. (This is true of other PSC-B commands, like
VER? to verify and RSP to report).
So when I try to change the baud rate, my BX24p hangs, which I assume is the result of the
PSC-B sending bytes back on the same pin.
I've tried parsing these bytes as input, but nothing seems to work, which I assume is
because there's no way for the BSX24p to define single pin as both serial input and output
simultaneously. (I've also tried defining COM3 with both buffers set to the same queue,
but this doesn't work either).
So is there any way to get the BX24p to deal with bytes coming back on the output pin? I
don't need to read them, I could just flush them out - anything so the BX doesn't hang.
Or, conversely, is there any way to set the PSC-B to boot up with the 38K4 baud rate, so
that I don't have to send the initial message? to set the baud rate?
It is really a drag that the PSC-B can't be changed with a simple jumper pin .
It is really a drag that the BX24 doesn't seem to be able to set up a single line for serial I/
Is there any answer to this? I'm desperate
on the output pin?  - anything so the BX doesn't hang.
The BX-24 has no idea that there is data trying to arrive on a COM3
output pin, so I suspect that is not what causes your hang. You
should be able to define COM3 using pin zero for input, send the speed
change command to the PSC, change the COM3 speed (which will not run
at 38k4, BTW; 19k2 max), and fire away blindly at the PSC.
If you are hanging, it is not due to incoming data.