0
\$\begingroup\$

I know that having TX, RX, GND, RTS, CTS are good. What about all of the others? Do devices these days even make use of the other pins (DSR, RI, DCD, DTR)? Is it safe to generally leave out these pins? It seems to me like these are mostly only used in fully-specified legacy DCE/DTE equipment. FYI I'm asking this question more specifically in the realm of embedded systems, not PCs.

\$\endgroup\$
1
  • \$\begingroup\$ I have seen embedded equipment recently that required all the lines but this is unusual. The documentation for the device you intend to talk to should detail what is required but more often than not you only need TX, RX and GND. Flow control is usually XON/XOFF. \$\endgroup\$ Apr 12 '14 at 19:13
1
\$\begingroup\$

Yes. Actually, a lot of RS-232 applications don't even use RTS/CTS anymore and have no hardware flow control at all - it is all done in software. Especially with the advent of virtual serial ports this is more the rule than the exception.

However, if you want to make a general RS-232 interface, RTS/CTS is smart to leave on there, just in case you are planning to attach a peripheral that uses it.

\$\endgroup\$
5
  • \$\begingroup\$ I'm asking this question more specifically in the realm of embedded systems, not PCs. Does the same apply in this area? I don't want to use software flow control at all for this application... I'll definitely do it with CTS/RTS. \$\endgroup\$
    – Pugz
    Apr 12 '14 at 17:36
  • \$\begingroup\$ This answer was aimed at embedded systems, so yes. \$\endgroup\$
    – user36129
    Apr 12 '14 at 17:42
  • \$\begingroup\$ Can you provide an example of the type of software flow control you're talking about? Is it related specifically to timing of signals or extra bits for flow control in data signals? I'm unfamiliar with a non-hardware method of FC in embedded, especially in devices where a DMA is used with a UART/USART peripheral (software FC is impossible in this case). \$\endgroup\$
    – Pugz
    Apr 12 '14 at 17:46
  • \$\begingroup\$ Software flow control is done using the XON/XOFF characters. The receiver sends an XOFF when it wants the transmitter to stop, then sends an XON to start the transmitter again. Most embedded UARTs will have FIFOs for both send and receive and you typically set up an interrupt when the receive FIFO gets close to being full, then send XOFF in the ISR. \$\endgroup\$
    – Joe Hass
    Apr 12 '14 at 17:55
  • \$\begingroup\$ Yeah, that's what I thought. XON/XOFF is not an option since we're dealing with dumb old equipment that doesn't support such FC schemes. I thought maybe there was something else he was talking about. \$\endgroup\$
    – Pugz
    Apr 12 '14 at 18:06
1
\$\begingroup\$

Many systems today only use RX, TX, and GND. RTS/CTS is sometimes still used for flow control. It can be quite useful to have flow control handled out of band by the hardware, as apposed to burdening the higher level protocol with it.

If you have a device that you know won't be using RTS and CTS, it is a good idea to loop these back to each other at your end so that if the other device does use them things will still work. You won't get flow control, but bytes can still be transmitted and received. As a example, take a look at the schematic to my RSLink2 product. Note how pins 7 and 8 are connected together on the RS-232 connector, although they aren't used anywhere else.

The remaining lines are almost never used anymore today. These were largely to control telephone modems, which had ring indicators, carrier detect, on/off hook, etc. Basically nobody uses telephone modems anymore, and even when they do, they are rarely external boxes connected to the computer via a RS-232 cable.

\$\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.