Shop OBEX P1 Docs P2 Docs Learn Events
multiple devices serial port — Parallax Forums

multiple devices serial port

ArchiverArchiver Posts: 46,084
edited 2000-04-22 01:04 in General Discussion
As I get started with the STAMP, I notice that most of the really
cool things to interface with (atomic clock, LCD, etc. etc.) all
must connect to the serial port. Since there's only one port on the
STAMP, how can you use multiple devices attached to it, if it's
even possible? Thanks for the help.

Steve

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-04-19 14:31
    Any pin on the Stamp can be a serial input or output using SERIN and SEROUT.
    In fact some special devices let you use the same pin for both (half duplex,
    of course).

    The pins are TTL level, so you can do 1 of 2 things:

    1) Use a 22K resistor in series with the external RS232 transmitter. This
    will allow the Stamp's input protection to absorb the extra voltage safely.
    Then on your side you can hope the other device will recognize 0 and +5V
    (most will, some won't).

    2) Use a level converter. The traditional way to go is a 1488/1489 but these
    require +/- 12V supplies. You can also use a MAX232 (see the Stamp Project
    of the Month this month at www.al-williams.com/awce/som.htm) or -- for more
    money -- a MAX233 which requires no capacitors. These chips just need 5V.

    In either case, the Stamp can only do half duplex. Also, careful planning is
    required to make sure that the Stamp is listening when the device is talking
    since the Stamp has no buffer or interrupts. The SXTech site
    (www.sxtech.com) will soon have part 2 of my SX course which has plans for
    making an SSIB that provides the Stamp with 2 buffered input channels. I'm
    not sure why it isn't up yet, but it should be soon.

    Also be aware that port 16 "echoes" everything you send to it automatically.
    You can read more about serial I/O at the Stamp FAQ:
    www.al-williams.com/wd5gnr/stampfaq.htm.

    Good luck,

    Al Williams
    AWC
    * Connect a PS/2 keyboard to your Stamp project:
    www.al-williams.com/awce/pak6.htm


    >
    Original Message
    > From: stephenb@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=e5J5mEqPYx1jEj1KS8XHHNqBjxg_h4WYAtuLKq5PpUMue5W9cS174_IObbUHVC0T1npC_4n7jL_1l9_CrtDNNKg]stephenb@a...[/url
    > Sent: Wednesday, April 19, 2000 8:24 AM
    > To: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] multiple devices serial port
    >
    >
    > As I get started with the STAMP, I notice that most of the really
    > cool things to interface with (atomic clock, LCD, etc. etc.) all
    > must connect to the serial port. Since there's only one port on the
    > STAMP, how can you use multiple devices attached to it, if it's
    > even possible? Thanks for the help.
    >
    > Steve
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-22 01:04
    Hi Steve,

    Try programming serial communications using I/O pins of the stamp. The I/O
    pins are specified in the serial communications commands when writing a
    program, so any and all I/O pins of the stamp will support serial
    communication.

    John

    Original Message
    From: stephenb@a... <stephenb@a...>
    To: basicstamps@egroups.com <basicstamps@egroups.com>
    Date: Wednesday, April 19, 2000 9:29 AM
    Subject: [noparse][[/noparse]basicstamps] multiple devices serial port


    >As I get started with the STAMP, I notice that most of the really
    >cool things to interface with (atomic clock, LCD, etc. etc.) all
    >must connect to the serial port. Since there's only one port on the
    >STAMP, how can you use multiple devices attached to it, if it's
    >even possible? Thanks for the help.
    >
    >Steve
    >
    >
    >
    >
    >
Sign In or Register to comment.