Shop OBEX P1 Docs P2 Docs Learn Events
Serin/Serout serial connection — Parallax Forums

Serin/Serout serial connection

TaishoTaisho Posts: 34
edited 2008-03-28 00:06 in BASIC Stamp
I am in over my head.... I want to do serin and serout commands to communicate between BS2 controllers. The commands I am ok with. My concern is the connection between the two Stamps. Do I just connect two wires between two pins each of the two Stamps? Some information I have found on serial communications with BS2's talks about needing resistors when talking to a PC RS232 port. I just don't want to cook my BS2s. Do I just go direct between the RX & TX pins? Do I need any voltage control in between? Can I go direct pin-pin?
I appreciate any help.

Post Edited (Taisho) : 3/27/2008 12:12:22 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-27 13:39
    Theoretically, you could directly connect one Stamp's I/O pins to the other's. In practice, it's safer to use a 330 to 1K Ohm resistor to connect them. If there's an error in your program and both connected I/O pins get set to output mode with their state set to opposite (one HIGH and one LOW), then you'll have a short circuit between one I/O pin supplying 5V and the other supplying 0V. The I/O pin circuitry can be damaged or destroyed very quickly that way. The resistor limits the maximum current to a value that the Stamp can sustain without damage without interfering with the serial I/O.
  • terry_bearterry_bear Posts: 84
    edited 2008-03-27 14:25
    Taisho,

    As Mike says (always!) the resistors are a good idea, for good practice. (two resistors, if you use separate I/O lines)

    If you use separate power sources for the two stamps, you will want to run a wire from vss of one to vss of the other. Otherwise, initial conditions may be unpredictable (at least they were for me...)

    Have fun,

    Terry
  • TaishoTaisho Posts: 34
    edited 2008-03-28 00:06
    Thanks guys. I appreciate your help. I have a lot to learn....hopefully before I start killing hardware tongue.gif
Sign In or Register to comment.