WHAT IS RS-232-C?
RS-232-C is a technical standard of the Electronic Industries Association (EIA). Published in August of 1969, it is titled "Interface Between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange." The standard specifies electrical signal characteristics and names and defines the functions of the signal and control lines that make up a standard interface called RS-232-C.
Figure 1-1 shows, diagrammatically, the kind of hook-up that RS-232-C was designed to standardize. A data terminal is at each end of the communication link. The data terminal either generates or receives data (or does both). It could be a keyboard/screen "terminal" in the normal sense of the word; it could be a computer, etc. The idea is that the data terminal is at the end of the communication link - hence it is called "terminal." However, the data terminal need not really be at the end - you can think of "data terminal" as just the name of one of the two ends of a RS-232-C connection.
At the other end of a RS-232-C connection is the data set. In the example of Figure 1-1, each data set takes data from the data terminal it is connected to and sends/receives the data over the communications link. The most familiar example of a data set is the modem (such as the ATARI 830 Acoustic Modem), which takes data from a terminal and converts it for sending and receiving over a telephone line.
The ATARI Home Computer with the interface module should be thought of as a unit comprising a RS-232-C data terminal.
A full-duplex connection is one where data can be sent and received by both ends of the RS-232-C connection simultaneously. In a half-duplex connection, data cannot be sent by both ends at the same time. Therefore, one terminal must be able to tell the other terminal, "I'm through now; it's your turn." The second terminal then sends a signal saying, "OK, here I come." This exchange is called "handshaking"; it is simply the sending and receiving of required signals to prepare each end of the connection for the sending or receiving of data. Handshaking can be used in fullduplex operation to tell the sending terminal to stop sending until the receiving terminal can catch up.
The data-set/data-terminal distinction should be kept in mind because the RS-232-C interface is directional. That is, each line in a RS-232-C interface has a direction — one device drives the line (sends information) and the other receives the information. Each line in an RS-232-C interface is defined as being driven by either the data-set end or the data-terminal end.
The RS-232-C standard defines some 20 signaling lines, or "circuits” as the standard refers to them. Most of them are optional and rarely used. Even with many omissions and deviations from the standard, a link may still be referred to as RS232-C. It is more common to refer to the link loosely as "RS-232" or "RS-232 compatible."
The most commonly used RS-232-C lines are listed in Table 1-1. The table shows the name of each line in the RS-232-C standard and commonly used mnemonics.
Transmit (XMT) and receive (RCV), for any given device, is usually relative to that device. That is, data goes out of a device on XMT and comes in on RCV. To connect two RS-232-C devices when given the common names of the signals, you should connect XMT to RCV (in one direction) and RCV to XMT (in the other direction). If one of the devices is wired as a data set and the other as a data terminal, then you should connect DTR to DTR, DSR to DSR, RTS to RTS, and so on. If, on the other hand, they are each wired as data terminals, you should be careful how things are connected.
The Signal Ground connection must always be made. RS-232-C requires that the ground potential of the two devices be equal. That is, their grounds must be connected together. Devices for which this requirement cannot be met cannot be connected via a RS-232-C interface.
Data terminal ready (DTR) is used by RS-232-C to allow the terminal to signal its readiness to send or receive data. This is a signal to automatic answering modems that they have permission to answer the ringing of the telephone line.
Data set ready (DSR) is used by the data set to signal its readiness to send or receive data. This indicates that communications are established.
Request to send (RTS) is used by the data terminal to tell the data set it wishes to send data. Some modems (Bell 202 for example) require this line to switch directions.
Clear to send (CTS) allows the data set to signal its readiness to pass data from the data terminal.
The carrier detect (CRX) line allows the data set to tell the data terminal that the communication link is established. This often differs little from DSR, except that DSR usually refers to "telephone off the hook" (answered), whereas CRX means something like "I hear the modem at the other end and we can talk now." When CRX goes OFF, data set ready OFF usually follows a few seconds later, indicating that the other end has "hung up."
In normal operation, DTR, DSR, and CRX are all ON. For full-duplex operation RTS and CTS are also both ON. However, it is often unnecessary to have all these lines ON — either one or the other devices on the RS-232-C connection does not have all the lines, or it is all right to ignore them (one of the properties of the RS-232-C standard is that not all of it needs to be implemented — it's perfectly all right to leave parts out). To operate the ATARI 830 Acoustic Modem, for instance, none of the control lines need to be used. In fact, the ATARI 830 Acoustic Modem ignores DTR and RTS, and it turns DSR, CTS, and CRX on and off together (with carrier).
Note that the communication link shown in Figure 1-1 is not defined by RS-232-C. In particular, this link seldom has more than the "equivalent" of XMT and RCV — that is, only data lines and no control. However, as often as not this link is a fullduplex link, so data can go both ways simultaneously. ASCII characters are the most common data sent, so the data sent each way can be either "control" data or "data" data.
With full-duplex operation, two devices can handshake with data in various ways. Common terminals usually do not have an internal connection between the keyboard and display (or they have a switch, usually called half/full duplex, to make or break this internal connection) so when talking with a computer in fullduplex mode (the most common mode), the computer at the other end "echoes" (sends back) each character to be displayed as it is typed. This allows you to see exactly what the computer at the other end receives. It also allows the computer at the other end to decide NOT to let you see what you have typed, as in "suppressing" the echo of a password.
In half-duplex operation, somewhere along the communications path data may pass in only one direction at a time. Not all parts of the communications path need be half duplex, but if any part is, then the whole system will probably have to send data only one way at a time. In half-duplex mode, the computer at the other end does not echo back what you type. In this case, in order to see what you type, the connection from keyboard to screen must be set locally; that is, set your terminal to "half duplex."
Note: The ATARI TeleLink I cartridge does not have the equivalent of a half/full switch. However, the ATARI 830 Acoustic Modem does have such a switch, and when it is placed in the half-duplex position, it echoes any data sent out over the phone back to the computer console.
A common handshake that requires full duplex is the XOFF/XON (transmit off/transmit on) handshake. The receiver of data can send XOFF to the sender to ask the sender to pause the data transmission and XON to resume. This allows the user of a screen terminal to stop the data so he can read the screen, and it allows a computer that is receiving data from another computer to effectively control the rate at which it can accept data.