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

RS-232 Networking

ArchiverArchiver Posts: 46,084
edited 2000-12-21 06:13 in General Discussion
I'm looking at the schematic for the RS-232 output in
the BS2 manual. I don't see why several stamps cannot
be hooked together network-style on one RS-232 line.
I'm not sure if I have this straight, so let me run
through my logic:

- Tying several inputs together is not a problem --
they're inputs. The only issue would be if I were to
tie too many together for the host PC to drive.

- The "at rest" state for Sout is -V, meaning that Q3
is off unless I'm transmitting. Correct? As long as my
timing is correct, meaning that only one stamp is
talking at a time, I shouldn't have a problem.

- Since Q3 is normally off, and since its more-or-less
an open collector circuit, I should be able to run a
common cable across several stamps. I don't think that
output impedance is going to be an issue.

I'd really appreciate some feedback on this before I
risk hooking multiple SX2's together to see if this
works.

Also, if my interpretation is wrong, can anybody point
out a link to a schematic so that I can "network"
several stamps together? I have done the networking
with a 5V circuit but it is only capable of working
with a few units over a short distance of cable. I
need to hook four units together over a 40' or 50' run
of cable.

TIA!

Mike







__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-12-20 11:47
    At 02:23 AM Wednesday 12/20/2000 -0800, you wrote:
    Hi Mike -

    >I'm looking at the schematic for the RS-232 output in
    >the BS2 manual. I don't see why several stamps cannot
    >be hooked together network-style on one RS-232 line.
    >I'm not sure if I have this straight, so let me run
    >through my logic:

    Yes - they can on the BS-2 series.

    >- Tying several inputs together is not a problem --
    >they're inputs. The only issue would be if I were to
    >tie too many together for the host PC to drive.
    >
    >- The "at rest" state for Sout is -V, meaning that Q3
    >is off unless I'm transmitting. Correct? As long as my
    >timing is correct, meaning that only one stamp is
    >talking at a time, I shouldn't have a problem.

    If you use flow-control timing won't be a problem.

    >- Since Q3 is normally off, and since its more-or-less
    >an open collector circuit, I should be able to run a
    >common cable across several stamps. I don't think that
    >output impedance is going to be an issue.

    That's essentially true but check the information mentioned below.

    >I'd really appreciate some feedback on this before I
    >risk hooking multiple SX2's together to see if this
    >works.
    >
    >Also, if my interpretation is wrong, can anybody point
    >out a link to a schematic so that I can "network"
    >several stamps together? I have done the networking
    >with a 5V circuit but it is only capable of working
    >with a few units over a short distance of cable. I
    >need to hook four units together over a 40' or 50' run
    >of cable.

    The new PBASIC Version 2.0 Manual has a section on flow-control and networking
    around Pages 303-305 (Adobe Acrobat pages differ slightly 305-307) for most
    of the information that you may require. This is the Serout section of the
    manual. Serin is NO problem, but care must be exercised for output, as
    noted in the text. Open source and drain outputs are the key to success.
    The pull-up resistors which are shown in Figure 5.35 that section should
    indicate the technique.

    >TIA!
    Sure

    >Mike

    Regards,

    Bruce Bates
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-20 15:27
    Bruce,

    I'm looking at 5.35 in the new manual as you suggest. They are
    showing two I/O pins configured as open source with a pull-down to
    ground. So this raises two questions:

    1) Can I tie together the Serout pins on multiple stamps?

    2) I don't know what the configuration is for an output pin on the
    BS2 family (totem pole???) If I use an I/O pin rather than the Serout
    pin for my serial communications, can I just pull the pin down,
    through a resistor, to -12V instead? And if the answer is yes, can I
    implement this by using a 10k pull-down resistor between the I/O pin
    that I am using as a serial output and whichever pin I am using as a
    serial input? (It seems to me that if the answer to this last
    question is yes, then parallax wouldn't have bothered with the
    transistor configuration that they use. But its worth asking. [noparse]:)[/noparse]

    Thanks Again,

    Mike
    miketurco@y...
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-20 16:22
    At 03:27 PM Wednesday 12/20/2000 +0000, you wrote:
    >Bruce,
    >
    >I'm looking at 5.35 in the new manual as you suggest. They are
    >showing two I/O pins configured as open source with a pull-down to
    >ground. So this raises two questions:
    >
    >1) Can I tie together the Serout pins on multiple stamps?

    Mike -

    Since your question isn't explicit (regarding pin numbers), let me presume
    that you're asking can ANY two pins be used for the Serout COMMAND and can
    they be tied together. The answer to that is yes. Check the top of Page
    NUMBERED 295 (Acrobat Reader Page 297) and you will note that any of the
    Port pins (BS-1 0-7, BS-2 0-15) can be used. Serout is a command, NOT a
    particular pin. The Programming pin is Port Pin 16 (used generally for
    programming and debug, and unique in it's external configuration). It is
    unique in other ways as well.

    >2) I don't know what the configuration is for an output pin on the
    >BS2 family (totem pole???) If I use an I/O pin rather than the Serout
    >pin for my serial communications, can I just pull the pin down,
    >through a resistor, to -12V instead? And if the answer is yes, can I
    >implement this by using a 10k pull-down resistor between the I/O pin
    >that I am using as a serial output and whichever pin I am using as a
    >serial input? (It seems to me that if the answer to this last
    >question is yes, then parallax wouldn't have bothered with the
    >transistor configuration that they use. But its worth asking. [noparse]:)[/noparse]

    The transistor configuration is somewhat unique to the needs of it's use as
    the programming port, and there are DEFINITE restrictions on its use. Said
    differently, unless there is a NEED to do so, I'd not use it for anything
    but programming. That's just ME, however : )

    There's more to this, and much it can be gleaned by perusing the areas of
    the manual mentioned above at/near Pages 29x. That entire area of Serin/Serout
    should almost be read like an entire chapter in a book. Failure to do so
    may endanger and damage the Stamp. Since THIS is beginning to reach
    chapter-length you're welcome to contact me offlist for further gory
    discussion on this topic : )

    >Thanks Again,
    >Sure !
    >Mike
    >miketurco@y...
    Regards,

    Bruce Bates
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-20 17:22
    Hi Mike,

    Are you talking about the pins 1 and 2 of the BS2 module, addressed
    in PBASIC as SEROUT 16,.. or SERIN 16,.. ? You're right, is an open
    collector circuit and the outputs, can be tied together, wired-OR.
    For more reliable operation (you say up to 50' of cable), you should
    tie an additional resistor (~2k) from the shared data line direct to
    common, (or to a negative voltage). Otherwise the pulldown may be
    too weak, too slow. You can see on the schematic that when two
    stamps are connected P16<-->P16, the pulldown path includes the
    20kohm base resistance of the input transistor. The additional
    resistor to common speeds up the pulldown.

    Of course, you have to get the timing right. Only one stamp can be
    talking at a time. But it won't hurt the stamps (even if one of them
    is turned off) if two talk at once. It never hurts to put a 50 ohm
    resistor in series with the line at each stamp, just in case.

    There are other options. See Jan Axelson's site. <http://www.lvr.com/>

    -- Tracy Allen
    http://www.emesystems.com


    >I'm looking at the schematic for the RS-232 output in
    >the BS2 manual. I don't see why several stamps cannot
    >be hooked together network-style on one RS-232 line.
    >I'm not sure if I have this straight, so let me run
    >through my logic:
    >
    >- Tying several inputs together is not a problem --
    >they're inputs. The only issue would be if I were to
    >tie too many together for the host PC to drive.
    >
    >- The "at rest" state for Sout is -V, meaning that Q3
    >is off unless I'm transmitting. Correct? As long as my
    >timing is correct, meaning that only one stamp is
    >talking at a time, I shouldn't have a problem.
    >
    >- Since Q3 is normally off, and since its more-or-less
    >an open collector circuit, I should be able to run a
    >common cable across several stamps. I don't think that
    >output impedance is going to be an issue.
    >
    >I'd really appreciate some feedback on this before I
    >risk hooking multiple SX2's together to see if this
    >works.
    >
    >Also, if my interpretation is wrong, can anybody point
    >out a link to a schematic so that I can "network"
    >several stamps together? I have done the networking
    >with a 5V circuit but it is only capable of working
    >with a few units over a short distance of cable. I
    >need to hook four units together over a 40' or 50' run
    >of cable.
    >
    >TIA!
    >
    >Mike
    >
    >
    >
    >
    >
    >
    >
    >__________________________________________________
    >Do You Yahoo!?
    >Yahoo! Shopping - Thousands of Stores. Millions of Products.
    >http://shopping.yahoo.com/
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-20 21:00
    Bruce, Tracy,

    Sorry for the poorly worded question w/ missing information, and
    thanks for your answers which lead me to the final answer anyway.

    My intention is to tie pins 1 and 2 together on the BS2, on up to
    four chips, through a straight-through ribbon cable and then to the
    serial port on a host PC. I'll definitely put a 50 ohm resistor in
    series with each output.

    Thanks,

    Mike
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-21 03:03
    >Sorry for the poorly worded question w/ missing information, and
    >thanks for your answers which lead me to the final answer anyway.
    >
    >My intention is to tie pins 1 and 2 together on the BS2, on up to
    >four chips, through a straight-through ribbon cable and then to the
    >serial port on a host PC. I'll definitely put a 50 ohm resistor in
    >series with each output.

    Mike,

    The serial port on the PC is not wired-OR, so don't hook it directly
    to your shared data bus. But it can be improvised--Put a diode in
    series with the PC td line, with the cathode pointing out toward the
    shared data bus. With the PC in the circuit, you probably won't need
    the additional pulldown resistor I mentioned in my last message.

    good luck,
    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-21 06:13
    >
    > The serial port on the PC is not wired-OR, so don't hook it
    directly
    > to your shared data bus.

    Tx on the PC to Rx on the stamp, etc. The PC is the master and the
    stamps are the slave. So I'm still OK with the plan. Thanks!
Sign In or Register to comment.