need help!!! BX24 with Parallax Servo Controller
pseudostereo
Posts: 1
I know this is a Basic Stamp forum, but I'm hoping someone here might have an answer...
I've inherited a project in which I have to use a BasicX24p to control some servos using a 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/O.
Is there any answer to this? I'm desperate
Thanks.
I've inherited a project in which I have to use a BasicX24p to control some servos using a 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/O.
Is there any answer to this? I'm desperate
Thanks.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
You should be able to solve this problem by putting a 1K resistor between your module's TX and RX pins. Connect the Sio line of the PSC to the RX pin. Just make sure that you can transmit and receive in True mode (idle = 5v, start bit = 0v).
Remember, you don't have to do anything with the input from the PSC; you could stick a 1K resistor in series with your TX pin and just ignore PSC input (you'll need to account for the time the PSC is using to transmit, however).