Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RS-232

This is for sure an optional section, but you might find it useful to know this stuff when talking with folks about serial in the future.

The earliest standard serial ports I am aware of were around 1960, when a standard called RS-232 (Revised Standard 232; there does not appear to be an “unrevised” version of this standard). It would be interesting to look at the RS-232 Standard: if you have US$65 lying around you are itching to give to the Telecommunications Industry Association, by all means go for it. (Industry associations tend to completely miss the concept of “shame”. Sigh.)

RS-232 was a way to hook Data Communications Equipment (DCE; a MODEM) to Data Terminal Equipment (DTE; a terminal) using just one wire to send data in each direction: the protocol used for data is described elsewhere in this chapter. Data rates were adjustable: it was typical to use the data rate of a MODEM when one was connected, so “standard” RS-232 rates tended to also be “standard” MODEM rates — 300bps, 600bps, 1200bps, 2400bps, 9600bps etc.

RS-232 also supported some other wires to do hardware “handshaking” (each end could signal that it was not taking data right now because it was busy) and various phone functions (“Is the phone ringing?”, “Take the phone off hook”, etc). RS-232 used a 25-pin “D” connector; signalling voltages were -12V for high and +12V for low, an old phone company standard.

When computers got into the mix, RS-232 became awkward. Big computers tended to be wired as DCE to talk to terminals, microcomputers tended to be wired DTE to talk to modems.

The IBM-PC AT popularized a smaller 9-pin connector (DE-9, often referred to as DB-9) version of the RS-232 port.

Eventually, it became common to drop most or all of the out-of-band wires on serial ports, reducing them to a 3-wire interface (transmit-receive-ground). It also became common for 0V/+5V and later 0V/+3.3V to be the signaling levels, to avoid “weird” voltages and interface issues.

Microsoft deliberately designed USB as a standard to replace RS-232; with its clunky wiring, various connectors, various voltages and transmit rates, it was far too difficult for the least-common-denominator consumer to use to connect devices to their PC. Because most MODEMs were still RS-232 at the time USB came out, Microsoft designed a USB “device class”, CDC-ACM, specifically to talk to RS-232 adapters used with these MODEMs.