12.4 Connections, Compatibility, and Null Modems

RS-232C interfaces are frequently used in applications for which the standard was not originally intended, specifically DTE-DTE connections. Computers, terminals, printers, plotters, and other DTEs often have serial interfaces labeled "RS-232C compatible." Generally this means that the signals that are implemented do not violate the standard but that not all of the standard's signals are implemented, that the device will therefore not interface properly with a modem, and is in fact designed for direct DTE-DTE connection. E.g., data can be sent from a computer to a serial printer using only the Transmitted Data and Signal Ground lines, if the software takes care of the delays needed to let the printer perform carriage return, form feed, etc.; if the printer uses the XON/XOFF protocol the Received Data line is also needed so that the printer can send the XON/XOFF characters back to the computer, and if it uses a busy/wait protocol a handshaking line (typically Data Set Ready) is needed instead. In any case, the Transmitted Data line from the computer (pin 2 of its DTE connector) must be wired to the Received Data line of the printer (pin 3 of its DTE connector), and other lines may have to be similarly crossed to imitate the use of modems. Examples of such "null-modem" cables are shown in Figure 12-3; the typical null-modem cable has female connectors at each end.

Figure 12-3. Typical Null-Modem Cables

The printer of other DTE device may deviate from the standard even further by using a female D-shell connector wired in such a way that a straight-through extension cable rather than a null-modem cable is used for the DTE-DTE connection. Also, a 9-pin connector may be used instead of the standard 25-pin connector. Furthermore, exactly which signals are used for handshaking depends on the device as well as the software used to drive it. Thus, the direct connection of two "RS-232C compatible" DTE devices may require some experimentation and preparation of a cable specific to that application. An arsenal of "breakout boxes" (preferably with bicolor LEDs showing which lines are active), null-modem boxes, 25-to-9 pin converters, and male-male and female-female "gender changers" may make this task easier.

Deviations from the standard may also occur with respect to signal levels. TTL inverters are sometimes used rather than RS-232C line drivers or receivers which may require a negative voltage supply. There are several potential problems with this approach: