Shop OBEX P1 Docs P2 Docs Learn Events
understanding RTS from xbee — Parallax Forums

understanding RTS from xbee

RL600RL600 Posts: 40
edited 2011-12-29 11:06 in BASIC Stamp
Hi,

For a while I have an xbee and working through the book getting started with xbee RF modules.
But they use at a certain point RTS.
There is some information but I can't get the whole story.
Can somebody give me some information about RTS.

RL600

Oh I almost forgot here is some information about the xbee I work with,
series 1 802.15.4 XBee 1 mW modules (2x)
basic stamp board (2x)
XBee SIP Adapter Boards (2x)

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2011-12-29 04:43
    RTS is one of the common 'handshaking' controls built into the RS-232 standard.

    Typically, RTS on one end of the link (whether wired or wireless) connects to CTS on the opposite end. And vice versa.

    RTS stands for "Ready to Send", CTS is "Clear to Send".


    Your software can control or monitor the signals to know when its safe to transmit data. Not all programs actively use RTS/CTS.

    Unless you're transmitting a large amount of data, most microcontroller applications can either ignore RTS/CTS or jumper them together so the device is fooled into always thinking it is safe to transmit.

    Jan Axelson's book "Serial Port Complete" is the bible on serial communication of all types.

    Cheers,
  • RL600RL600 Posts: 40
    edited 2011-12-29 08:21
    Many thanks for the information,

    RL600
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2011-12-29 11:06
    RTS (request to send) is very useful with the BASIC Stamp SERIN command for flow control. The Stamp does not have an input buffer and takes some time to move each byte received into the internal variables. The Stamp can often miss or garble the input data if it arrives too fast. There is even more delay if your PBASIC program has to do something to process data in between SERIN commands, during which time more data may be arriving wirelessly. The RTS signal tells the XBee to hold off on sending data until the Stamp is sitting on a SERIN command is ready to receive it.

    SERIN XBin\XBrts, XBmode, [XBdata]
    The Stamp pulses the RTS line to the "not ready" state in between the bytes that it receives, and leaves the RTS line in the "not ready" state after the SERIN finishes executing. That is, until this or another SERIN command reactivates it.

    You asked for information about RTS. What sort of information or clarification specifically?

    There are scenarios where the flow control might not be necessary, for example, for simple messages or single byte command-response. Some people configure the XBee and Stamp for a slower baud rate, say 2400 instead of 9600, where the issue is less acute.
Sign In or Register to comment.