Shop OBEX P1 Docs P2 Docs Learn Events
need help!!! BX24 with Parallax Servo Controller — Parallax Forums

need help!!! BX24 with Parallax Servo Controller

pseudostereopseudostereo Posts: 1
edited 2007-04-24 15:46 in General Discussion
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.

Comments

  • metron9metron9 Posts: 1,100
    edited 2007-04-24 14:12
    After reading your post, I have not worked with either of the devices in question but how about two diodes?
    PSC-B -----------diode>------BX24 input
              |________<diode_____BX24 output
    
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-24 15:03
    This thread is being moved from the BASIC Stamp Forum to the Sandbox Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • JonnyMacJonnyMac Posts: 8,941
    edited 2007-04-24 15:46
    Here's another example of where a copycat product just falls on its face -- if the BX24 is so much better than a BASIC Stamp (as they will try to tell you), then why can't it bit-bang serial I/O on any pin like a Stamp can?....

    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).
Sign In or Register to comment.