Shop OBEX P1 Docs P2 Docs Learn Events
RS-232 communication limitations — Parallax Forums

RS-232 communication limitations

ArchiverArchiver Posts: 46,084
edited 2003-05-15 17:02 in General Discussion
Hello all,
I have been reading a lot about the DB9 RS-232 connection between
the BASIC stamp 2 and a PC, and am rather confused. I plan to connect
my BS2sx to my computer via the 'serial' RS-232 port, for both
programming and communicating. With the existing hardware, that is
the RS-232 connection to the stamp advised on the parallax website
and a normal DB9 cable, is it possible to transfer I/O to, say, a c++
program? Also, as a side note, since the stamp runs on 0V to 5V and
true RS-232 runs on +12V to -12V, will I need a voltage converter to
make the initial connection? I know some laptops have problems with
this, and I'm sure all motherboard manufacturers work differently on
this issue, but in general are modern motherboards able to
communicate on 0V to 5V? Thanks again.
Stefan Dorsett

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-05-14 08:35
    Hi

    RS232 comm with a stamp for programming or just data IO is not
    a problem at all - I am doing it everyday (using Linux btw).
    Usually you dont need a voltage converter as todays interfaces are
    well satisfied with TTL levels (btw RS232 levels are high -3..-12V
    and low +3..+12V resp). You need Rx, Tx, DTR and GND from the
    serial port to hook up a stamp. DTR is needed to reset the stamp for
    programming and is not needed for just data IO (provided you don't
    intend to reset the stamp in such cases). ATN is merely the base
    of an internal transistor connected to /RST (ATN is positive logic
    while /RST is negative logic).

    Tx
    SIN
    Rx
    SOUT
    DTR
    ATN
    GND
    Vss

    or better (better noise resistance)

    Tx
    SIN
    Rx
    SOUT
    DTR
    +--||----ATN
    _|_ 100n
    ---
    |100n
    GND
    +
    Vss

    The problems which some laptops have ususally could be solved
    by turning of the FIFO (I don't know why, but I never heared
    of this being a problem with desktops).

    Regards
    Adrian
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-14 14:30
    The "built-in interface on pins 1 & 2 is designed to work with "standard rs232
    levels".
    Have a look...

    http://www.qsl.net/kf4haz/cables/stamps/

    From: "Stefan Dorsett"

    > Hello all,
    > I have been reading a lot about the DB9 RS-232 connection between
    > the BASIC stamp 2 and a PC, and am rather confused. I plan to connect
    > my BS2sx to my computer via the 'serial' RS-232 port, for both
    > programming and communicating. With the existing hardware, that is
    > the RS-232 connection to the stamp advised on the parallax website
    > and a normal DB9 cable, is it possible to transfer I/O to, say, a c++
    > program? Also, as a side note, since the stamp runs on 0V to 5V and
    > true RS-232 runs on +12V to -12V, will I need a voltage converter to
    > make the initial connection? I know some laptops have problems with
    > this, and I'm sure all motherboard manufacturers work differently on
    > this issue, but in general are modern motherboards able to
    > communicate on 0V to 5V? Thanks again.
    > Stefan Dorsett
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-14 19:27
    Thanks!
    I read the documentation today when I was getting my 100nf
    capacitors, so hopefully I'll be able to get everything hooked up and
    working. If I have any more questions, expect me back here. Thanks
    again.
    Stefan

    --- In basicstamps@yahoogroups.com, "Adrian Schneider"
    <adrian.schneider@t...> wrote:
    > Hi
    >
    > RS232 comm with a stamp for programming or just data IO is not
    > a problem at all - I am doing it everyday (using Linux btw).
    > Usually you dont need a voltage converter as todays interfaces are
    > well satisfied with TTL levels (btw RS232 levels are high -3..-12V
    > and low +3..+12V resp). You need Rx, Tx, DTR and GND from the
    > serial port to hook up a stamp. DTR is needed to reset the stamp
    for
    > programming and is not needed for just data IO (provided you don't
    > intend to reset the stamp in such cases). ATN is merely the base
    > of an internal transistor connected to /RST (ATN is positive logic
    > while /RST is negative logic).
    >
    > Tx
    SIN
    > Rx
    SOUT
    > DTR
    ATN
    > GND
    Vss
    >
    > or better (better noise resistance)
    >
    > Tx
    SIN
    > Rx
    SOUT
    > DTR
    +--||----ATN
    > _|_ 100n
    > ---
    > |100n
    > GND
    +
    Vss
    >
    > The problems which some laptops have ususally could be solved
    > by turning of the FIFO (I don't know why, but I never heared
    > of this being a problem with desktops).
    >
    > Regards
    > Adrian
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-14 20:31
    Ok, so I'm back.
    I got everything and hooked it up, and the stamp 2.0 beta couldn't
    find it on either loopback or echo. I thought maybe the cable I was
    using may be null modem, so I switched the send and recieve, still
    nothing. I've tried using 100nf capacitors as advised, and connecting
    straight through. I've tried even turning off FIFO on my desktop. I'm
    powering the stamp through a 9V battery connected to VIN and VSS.
    Please let me know if you see some sort of problem with my setup, or
    if you have any suggestions. Thanks.
    Stefan

    --- In basicstamps@yahoogroups.com, "Stefan Dorsett"
    <tebukuro42@y...> wrote:
    > Thanks!
    > I read the documentation today when I was getting my 100nf
    > capacitors, so hopefully I'll be able to get everything hooked up
    and
    > working. If I have any more questions, expect me back here. Thanks
    > again.
    > Stefan
    >
    > --- In basicstamps@yahoogroups.com, "Adrian Schneider"
    > <adrian.schneider@t...> wrote:
    > > Hi
    > >
    > > RS232 comm with a stamp for programming or just data IO is not
    > > a problem at all - I am doing it everyday (using Linux btw).
    > > Usually you dont need a voltage converter as todays interfaces are
    > > well satisfied with TTL levels (btw RS232 levels are high -3..-12V
    > > and low +3..+12V resp). You need Rx, Tx, DTR and GND from the
    > > serial port to hook up a stamp. DTR is needed to reset the stamp
    > for
    > > programming and is not needed for just data IO (provided you don't
    > > intend to reset the stamp in such cases). ATN is merely the base
    > > of an internal transistor connected to /RST (ATN is positive logic
    > > while /RST is negative logic).
    > >
    > > Tx
    SIN
    > > Rx
    SOUT
    > > DTR
    ATN
    > > GND
    Vss
    > >
    > > or better (better noise resistance)
    > >
    > > Tx
    SIN
    > > Rx
    SOUT
    > > DTR
    +--||----ATN
    > > _|_ 100n
    > > ---
    > > |100n
    > > GND
    +
    Vss
    > >
    > > The problems which some laptops have ususally could be solved
    > > by turning of the FIFO (I don't know why, but I never heared
    > > of this being a problem with desktops).
    > >
    > > Regards
    > > Adrian
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-14 22:10
    Well, if it IS null modem, the DTR/ATN line will
    be on the wrong pin, so you'll have to swap that
    too (with the original DSR line).
    So:
    Straight through: 3 is TX-Out of PC, TX-In of BS2
    2 is RX-In of PC, RX-Out of BS2
    4 is DTR-OUT of PC, ATN-IN of BS2
    Pin 5 is GROUND, common to both.

    With NullModem cable:
    Must swap 2 and 3, 6 and 4

    --- In basicstamps@yahoogroups.com, "Stefan Dorsett"
    <tebukuro42@y...> wrote:
    > Ok, so I'm back.
    > I got everything and hooked it up, and the stamp 2.0 beta couldn't
    > find it on either loopback or echo. I thought maybe the cable I was
    > using may be null modem, so I switched the send and recieve, still
    > nothing. I've tried using 100nf capacitors as advised, and
    connecting
    > straight through. I've tried even turning off FIFO on my desktop.
    I'm
    > powering the stamp through a 9V battery connected to VIN and VSS.
    > Please let me know if you see some sort of problem with my setup,
    or
    > if you have any suggestions. Thanks.
    > Stefan
    >
    > --- In basicstamps@yahoogroups.com, "Stefan Dorsett"
    > <tebukuro42@y...> wrote:
    > > Thanks!
    > > I read the documentation today when I was getting my 100nf
    > > capacitors, so hopefully I'll be able to get everything hooked up
    > and
    > > working. If I have any more questions, expect me back here.
    Thanks
    > > again.
    > > Stefan
    > >
    > > --- In basicstamps@yahoogroups.com, "Adrian Schneider"
    > > <adrian.schneider@t...> wrote:
    > > > Hi
    > > >
    > > > RS232 comm with a stamp for programming or just data IO is not
    > > > a problem at all - I am doing it everyday (using Linux btw).
    > > > Usually you dont need a voltage converter as todays interfaces
    are
    > > > well satisfied with TTL levels (btw RS232 levels are high -3..-
    12V
    > > > and low +3..+12V resp). You need Rx, Tx, DTR and GND from the
    > > > serial port to hook up a stamp. DTR is needed to reset the
    stamp
    > > for
    > > > programming and is not needed for just data IO (provided you
    don't
    > > > intend to reset the stamp in such cases). ATN is merely the base
    > > > of an internal transistor connected to /RST (ATN is positive
    logic
    > > > while /RST is negative logic).
    > > >
    > > > Tx
    SIN
    > > > Rx
    SOUT
    > > > DTR
    ATN
    > > > GND
    Vss
    > > >
    > > > or better (better noise resistance)
    > > >
    > > > Tx
    SIN
    > > > Rx
    SOUT
    > > > DTR
    +--||----ATN
    > > > _|_ 100n
    > > > ---
    > > > |100n
    > > > GND
    +
    Vss
    > > >
    > > > The problems which some laptops have ususally could be solved
    > > > by turning of the FIFO (I don't know why, but I never heared
    > > > of this being a problem with desktops).
    > > >
    > > > Regards
    > > > Adrian
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-15 14:51
    ALSO, the BS2 IDE wants pin 6 looped to pin 7
    on the connector, so it 'knows' it has a cable
    connected. Sheesh.

    --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
    wrote:
    > Well, if it IS null modem, the DTR/ATN line will
    > be on the wrong pin, so you'll have to swap that
    > too (with the original DSR line).
    > So:
    > Straight through: 3 is TX-Out of PC, TX-In of BS2
    > 2 is RX-In of PC, RX-Out of BS2
    > 4 is DTR-OUT of PC, ATN-IN of BS2
    > Pin 5 is GROUND, common to both.
    >
    > With NullModem cable:
    > Must swap 2 and 3, 6 and 4
    >
    > --- In basicstamps@yahoogroups.com, "Stefan Dorsett"
    > <tebukuro42@y...> wrote:
    > > Ok, so I'm back.
    > > I got everything and hooked it up, and the stamp 2.0 beta
    couldn't
    > > find it on either loopback or echo. I thought maybe the cable I
    was
    > > using may be null modem, so I switched the send and recieve,
    still
    > > nothing. I've tried using 100nf capacitors as advised, and
    > connecting
    > > straight through. I've tried even turning off FIFO on my desktop.
    > I'm
    > > powering the stamp through a 9V battery connected to VIN and VSS.
    > > Please let me know if you see some sort of problem with my setup,
    > or
    > > if you have any suggestions. Thanks.
    > > Stefan
    > >
    > > --- In basicstamps@yahoogroups.com, "Stefan Dorsett"
    > > <tebukuro42@y...> wrote:
    > > > Thanks!
    > > > I read the documentation today when I was getting my 100nf
    > > > capacitors, so hopefully I'll be able to get everything hooked
    up
    > > and
    > > > working. If I have any more questions, expect me back here.
    > Thanks
    > > > again.
    > > > Stefan
    > > >
    > > > --- In basicstamps@yahoogroups.com, "Adrian Schneider"
    > > > <adrian.schneider@t...> wrote:
    > > > > Hi
    > > > >
    > > > > RS232 comm with a stamp for programming or just data IO is not
    > > > > a problem at all - I am doing it everyday (using Linux btw).
    > > > > Usually you dont need a voltage converter as todays
    interfaces
    > are
    > > > > well satisfied with TTL levels (btw RS232 levels are high -
    3..-
    > 12V
    > > > > and low +3..+12V resp). You need Rx, Tx, DTR and GND from the
    > > > > serial port to hook up a stamp. DTR is needed to reset the
    > stamp
    > > > for
    > > > > programming and is not needed for just data IO (provided you
    > don't
    > > > > intend to reset the stamp in such cases). ATN is merely the
    base
    > > > > of an internal transistor connected to /RST (ATN is positive
    > logic
    > > > > while /RST is negative logic).
    > > > >
    > > > > Tx
    SIN
    > > > > Rx
    SOUT
    > > > > DTR
    ATN
    > > > > GND
    Vss
    > > > >
    > > > > or better (better noise resistance)
    > > > >
    > > > > Tx
    SIN
    > > > > Rx
    SOUT
    > > > > DTR
    +--||----ATN
    > > > > _|_ 100n
    > > > > ---
    > > > > |100n
    > > > > GND
    +
    Vss
    > > > >
    > > > > The problems which some laptops have ususally could be solved
    > > > > by turning of the FIFO (I don't know why, but I never heared
    > > > > of this being a problem with desktops).
    > > > >
    > > > > Regards
    > > > > Adrian
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-15 17:02
    To rephrase something most people have said I put a 2 pin jumper block on
    the ANT/DTR line. Use the jumper for Stamp download and debug. Open the
    jumper for normal serial comm. Out of that connector.

    Original Message
    From: Adrian Schneider [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=0PqtCal0RStV_xCTvBMXgPKglueXybx24e3GZWurSVpnWEnM-swnK8IfsCpe23dWtAm-vHgvxcALhqS2cVqeygZZJHMDFQ]adrian.schneider@t...[/url
    Sent: Wednesday, May 14, 2003 3:36 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: RS-232 communication limitations

    Hi

    RS232 comm with a stamp for programming or just data IO is not
    a problem at all - I am doing it everyday (using Linux btw).
    Usually you dont need a voltage converter as todays interfaces are
    well satisfied with TTL levels (btw RS232 levels are high -3..-12V
    and low +3..+12V resp). You need Rx, Tx, DTR and GND from the
    serial port to hook up a stamp. DTR is needed to reset the stamp for
    programming and is not needed for just data IO (provided you don't
    intend to reset the stamp in such cases). ATN is merely the base
    of an internal transistor connected to /RST (ATN is positive logic
    while /RST is negative logic).

    Tx
    SIN
    Rx
    SOUT
    DTR
    ATN
    GND
    Vss

    or better (better noise resistance)

    Tx
    SIN
    Rx
    SOUT
    DTR
    +--||----ATN
    _|_ 100n
    ---
    |100n
    GND
    +
    Vss

    The problems which some laptops have ususally could be solved
    by turning of the FIFO (I don't know why, but I never heared
    of this being a problem with desktops).

    Regards
    Adrian


    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/



    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.