Shop OBEX P1 Docs P2 Docs Learn Events
3 wire serial communication BS2p (stepper motor controller) — Parallax Forums

3 wire serial communication BS2p (stepper motor controller)

UFi911UFi911 Posts: 3
edited 2007-11-06 15:21 in BASIC Stamp
I'm trying to connect a BS2p40 to one of these:
http://www.eggertelectronics.com/ssc3info.htm

The stepper motor controller has a 3 wire serial connection, RX - TX - G fixed at 9600 Baud, No Parity, 8 Data bits 1 Stop bit.

How do I connect the stamp, and do I have to use Pin 0 and Pin 1 (dedicated serial pins)?

1 - I'm not sure how to connect it, everything I find in the books and online uses 1-wire serial communication.
2 - If I have to use Pin 0 and Pin 1 - is there a way to program and run without moving the cable around? (big pain to program, unplug, run, replug, etc. etc.)

Thanks in advance,

-John

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-06 14:56
    The important thing to notice is that this stepper motor controller expects an RS232 serial connection. This is not directly compatible with a Stamp's I/O pins and can damage the stamp if directly connected. You may be able to just use a resistor between an I/O pin and the TX connection along with a direct connection or another resistor between another I/O pin and the RX connection (with the G - ground connected to the BS2p40's Vss pin). Read the chapters in the PBasic Manual on the SERIN and SEROUT statements. They have examples of using an RS232 device with a Stamp.
  • UFi911UFi911 Posts: 3
    edited 2007-11-06 15:07
    Mike - if I use Pin 0 and Pin 1 can I skip the resistors?

    Ultimately I would want to free up 0 and 1 for programming, but I would like to get it working before I complicate anything.· One of my concerns is I notice in the manual that the BS2 may have trouble synchronizing at 9600 due to lack of a hardware input buffer.

    Am I ultimately heading for a Max232 or something similar?

    Thanks,

    -John
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-11-06 15:18
    It seems you’re referring to SIN and SOUT, which are the programming port pins, which are RS-232 compatible, however this is not a guarantee the device will work as that port does not provide the RS-232 voltages directly. In any event if you connect it be sure your connections are correct. Since this is the programming port you will need to swap the cable. However if you want to use any standard I/O pins just get a line driver, such as the MAX232 and then you will have a compatible RS-232 interface. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • UFi911UFi911 Posts: 3
    edited 2007-11-06 15:21
    Thanks guys - I have a 232 on the bench, I'll give that a try.· Sounds safer too [noparse]:)[/noparse]

    -John
    ·
Sign In or Register to comment.