Shop OBEX P1 Docs P2 Docs Learn Events
RS232 COMS for peripherals — Parallax Forums

RS232 COMS for peripherals

navegante1975navegante1975 Posts: 2
edited 2009-01-09 15:31 in BASIC Stamp
Hello, I'm new to Parallax (BS2, SX Tect...) so if anyone can help me please.....

My project involves controlling 3 devices by sending RS232 commands, pretty simple overall, the peripherals Video switches)·just sit there and wait for the commands
So my question is, how can I acomplish this with a BS2, I know there is a serial port, but is it at RS232 levels? and how would you recommend adding the other 2-3 com ports
I guess I need to add a MAX232 circuit.. right? and can I use any PINS on the BS?

Any pointers to help me get started would be appreciated

Sincerely

Max

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-09 15:07
    The port used for programming (port # 16) has some voltage conversion circuitry, but has some limitations. In particular, anything sent from the device to the Stamp is echoed back to the device. Also, if the device toggles the DTR line, it causes the Stamp to reset.

    Any other I/O pins can be used for serial I/O and sometimes you can use them directly with an RS232 device without a MAX232. Inputs require a current limiting resistor, usually 22K. This is described in the Stamp Manual in the chapters on the SEROUT and SERIN statements. The voltage levels are not standard RS232, but work with most modern RS232 devices. If not, you can always use a MAX232.
  • navegante1975navegante1975 Posts: 2
    edited 2009-01-09 15:22
    THanks for the start Mike.
    So if these are the only limitations its not so bad, on the echo from the Stamp, I assume that if the device does not get the commnad its waiting for it will just dump it, and given that its a basic 3 wire Comm, the DTR will not be toggled, if that sounds correct. But does the port provide -15 - +15 RS232 driving voltages and is this the same with the other I/O pins?

    Thanks again
  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-09 15:31
    The circuit for the programming port is shown in the Stamp Manual and other places. It "steals" power from the receive line to provide the negative voltage for RS232 and the positive driving voltage is limited to 5V. With direct connection to the I/O pins, the output voltages are +5V and 0V. This will work with many RS232 devices, but is nowhere near RS232 voltage levels. For that you need a MAX232 or equivalent.
Sign In or Register to comment.