RS232C

RS232C is a communications port standard

RS232C separates equipment into Data Terminal Equipment (DTE) and Data Communication Equipment (Modems) (DCE). This is rather simplistic, as it always assumes that you will connect a modem to a terminal, however the use of the serial connection has extended somewhat since those days.

The RS232C standard defines the meanings of the signals, but not the type of connector, nor the pins on which each signal appears. Despite that, the 25 pin (and 9 pin) D connectors on an IBM compatible personal computer are generally accepted as a sort of standard for the pins, so I'll use these as examples.

When indicating a direction for data, it is usually from the viewpoint of DTE equipment. The popular names of the lines tend to be as follows:

    D25  D9  Name
PG   1       Protective Ground
SG   7       Signal Ground
TxD  2       (DTE) Data transmitted by DTE to DCE
RxD  3       (DCE) Data received by DTE from DCE
RTS  4       (DTE) "Request to Send" Start transmitter
CTS  5       (DCE) "Clear to Send" Have started transmitter
DSR  6       (DCE) "Data Set Ready" Modem ready to work
DCD  8       (DCE) "Data Carrier Detect" Remote transmitter is active
DTR 20       (DTE) "Data Terminal Ready" DTE indicates DCE may go off-hook
RI  22       (DCE) "Ring Indicator" DCE says a remote DCE has called

The meanings of the signals relate to the days when phone systems were used manually, and when half duplex (signals in one direction only at a time) was common. Also, the connections went DTE (terminal) to DCE (modem) via phone line to (remote modem) DCE connected to remote DTE (terminal).

So for a phone call, the proper approach is activate DTR, send dial codes, wait for DSR to go active, and then look for valid data. To accept a call, wait for RI, only then activate DTR, and wait for DSR. If DTR has been active, the call is answered at once.

What about RST and CTS, and DCD for that matter, I hear you ask. They were only needed for half duplex operation. The DTE asserts RTS, and as soon as the DCE asserts CTS, the DTE can send. The remote DTE (as distinct from the local one) can use DCD to indicate it has valid data available on RxD (DTE should ignore the data on RxD until then).

Since half duplex became less common, it was noticed that CTS could be handy for controlling the data flow from DTE to DCE. However it would be nice to have DCE to DTE control as well, so some people used RTS as a sort of reverse CTS.

DTE asserts RTS, so DCE can send data
DTE stops RTS, so DCE should stop sending data
DCE asserts CTS, so DTE can send data to DCE
DCE stops CTS, so DTE should stop sending
but this was never how it was designed to act, because there is no
hardware flow control designed in.  These signals were for half duplex
direction changes only.

You end up with a model something like this:

DTE      DCE    What it does
TxD  to  TxD    Data
DTR  to  DTR    Primary modem control
RTS  to  RTS    Secondary modem control
Gnd  --  Gnd    Ground
CTS from CTS    Secondary modem control
DCD from DCD    Primary modem control
RxD from RxD    Data

When computers enter the picture, things change even more. You don't need DCD or any modem control between a computer and a terminal. But you do need something to indicate the other device is there.

See also this more comprehensive RS232 Standard explanation.

I hope you have enjoyed www.ericlindsay.com.