Shop OBEX P1 Docs P2 Docs Learn Events
Multiple serial communications — Parallax Forums

Multiple serial communications

ArchiverArchiver Posts: 46,084
edited 2003-04-20 23:08 in General Discussion
I'm building a data collection system. I have multiple RS232 devices
(commercial products that can't be altered) that need to connect to
the basic stamp and the basic stamp needs to connect to a computer.
There are also several other relays, switches, etc. that the basic
stamp needs to interface. The problem is how to handle three or more
simultanious (or nearly simultanious) serial connections with the
basic stamp. Any ideas?

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-04-19 19:49
    The stamp can't really do several things at once. You can handle several
    serial ports "at once", as long as they don't send data at the same time.
    When the Stamp is receiving data (via Serin), that's all it is going to do.
    The other serial devices can send all the data they want, and the Stamp
    will ignore them.

    Now, if the external devices only send data when they are asked to by the
    Stamp, then you don't have a problem, as you can handle them one at a time,
    although on separate pins.

    If you really need to handle several simultaneous serial data streams, you
    will probably have to use a coprocessor, such as a PIC, or maybe even
    several PICS, and have them store the data until the Stamp can handle it.

    Larry

    At 06:15 PM 4/19/2003 +0000, you wrote:
    >I'm building a data collection system. I have multiple RS232 devices
    >(commercial products that can't be altered) that need to connect to
    >the basic stamp and the basic stamp needs to connect to a computer.
    >There are also several other relays, switches, etc. that the basic
    >stamp needs to interface. The problem is how to handle three or more
    >simultanious (or nearly simultanious) serial connections with the
    >basic stamp. Any ideas?
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and
    >Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

    Larry Bradley
    Orleans (Ottawa), Ontario, CANADA
  • ArchiverArchiver Posts: 46,084
    edited 2003-04-20 23:08
    Yes.
    The Maxim 3110 is a 28-pin narrow dip, which comes
    with a hardware UART (TX and RX), and 2 232 drivers,
    and 2 232 receiver gates.

    It does need a 3.8 Mhz crystal, and two 10 pF caps
    for the Baud generator circuit.

    It has a 3-wire interface (SPI) to the Stamp.

    It has an 8 character input buffer -- which is quite
    small for Stamp use, really.

    You can set up one of these per port, and have a tight
    loop which samples each one to find if it has recieved
    one or more bytes.

    There do exist solutions which use a PIC, and have much
    larger receive buffers, but I have found the 3110 to
    be a very simple and reliable way of having the stamp
    do something else most of the time, and check the
    buffer every so often.

    --- In basicstamps@yahoogroups.com, "selket_10027"
    <selket_10027@y...> wrote:
    > I'm building a data collection system. I have multiple RS232
    devices
    > (commercial products that can't be altered) that need to connect to
    > the basic stamp and the basic stamp needs to connect to a
    computer.
    > There are also several other relays, switches, etc. that the basic
    > stamp needs to interface. The problem is how to handle three or
    more
    > simultanious (or nearly simultanious) serial connections with the
    > basic stamp. Any ideas?
Sign In or Register to comment.