Shop OBEX P1 Docs P2 Docs Learn Events
Configuring pin 16 integrating with wireless modem. — Parallax Forums

Configuring pin 16 integrating with wireless modem.

Robert GrayRobert Gray Posts: 2
edited 2007-04-05 08:10 in BASIC Stamp
I'm trying to integrate a XBEE wireless modem directly with the sin pin and sout pin. I'm sending data at 9600 baud 8N1. When I analyze the sout pin it looks as if the data is being sent inverted, in other words the line is held low and until the data starts. I tried using the different configurations for the serout command and the data still comes out the same way, inverted. Is there something special about these pins that the data cannot be sent true instead of inverted?

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2007-04-04 21:12
    Yup, the "pin 16" has a special thing that it ignores the "Inverted" signal -- I don't know why. The hardware also 'echo's everything out RX that gets sent in to TX, so that too is a problem.

    It MIGHT work with the TTL levels that the BS2 can already generate, you might just try it. Put a 22 KOhm resistor in series with the recieve line, though.
  • Robert GrayRobert Gray Posts: 2
    edited 2007-04-04 21:32
    Thanks for the response, I think I'm going to put an inverter circuit.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-04-04 21:57
    Here's a question, though -- why would the XBee WANT a signal different from what a PC would put out? Because that's the signal the 16 port puts out.

    Note it uses the incoming 'TX' voltage, and modulates that with the RX signal going back. So if the XBee is not sending a good -10 volts, the BS2 can't 'modulate' that to +5 to send the signal back.

    Now, if you use a MAX232 inverter circuit, then you can connect the XBee to any two BS2 pins (one input, one output) that you like.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-04-05 08:10
    Robert -

    If you add an inverter circuit at the PBASIC Stamp level, I doubt you willl be able to program the Stamp any more. The two solutions to this are:

    1. Use a pin port other than pin port 16.

    2. Build the inverter circuit at the "far end" (at the other end of the communications link) so that if it's removed, pin port 16 will be as it originally was.

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 4/5/2007 8:54:05 AM GMT
Sign In or Register to comment.