2
\$\begingroup\$

I want to communicate using a serial cable to a device that uses RTS/CTS flow control and 115200 baud speed. I want to use this Sparkfun TTL to rs232 adapter, but it has no RTS or CTS pins. What can I do to get hardware flow control or is there a software solution?

\$\endgroup\$
  • \$\begingroup\$ Wow, that circuit is quite a hack. No wonder they are being so wishy-washy about how fast it can really go. It's funny how they say it's for when a MAX232 isn't available, but yet this is a kit, so they could make it simply available. For a little more money, but fully assembled and with real specs not dependent on the incoming data, check out my logic to RS-232 converter at microchipdirect.com/ProductSearch.aspx?Keywords=TEMR. Full specs are at embedinc.com/products/rslink2/index.htm. \$\endgroup\$ – Olin Lathrop Dec 23 '14 at 18:13
  • \$\begingroup\$ If you give us more information about the device and what you intend to communicate, we can help determine whether RTS/CTS is really necessary. \$\endgroup\$ – pericynthion Dec 23 '14 at 21:04
  • \$\begingroup\$ Judging by the reviews and the 'works greats up to 38400 bps' statement, you should clearly look for another adapter. \$\endgroup\$ – user207421 Dec 24 '14 at 4:32
  • \$\begingroup\$ The device it will connect to is a Z80 based homebuilt microcomputer, it will send data both ways for keyboard and display. Info here: searle.hostei.com/grant/cpm/index.html \$\endgroup\$ – user60684 Dec 24 '14 at 9:50
3
\$\begingroup\$

The software solution is called XON/XOFF flow control. It basically consists of sending ^S/DC3 (0x13) to suspend transmission and ^Q/DC1 (0x11) to resume it. Naturally this requires the other side to support it, so if only hardware flow control is supported then it won't be a viable solution.

\$\endgroup\$
2
\$\begingroup\$

If both ends are always fast enough to receive all the other end sends, there is no need for flow control. This is often the case with UART speeds.

\$\endgroup\$
2
\$\begingroup\$

If your device requires hardware flow control, one hack is to connect its RTS to its own CTS pin. This way, it's telling itself that it's OK to send. The hack is that if you do overrun its input buffer, it will suppress its sending instead. If sending data is required for consuming its own input (e. g. input echoing or command/response sequences), you can end up in a deadlock so you need to be careful not to send stuff too fast.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.