HOME

TheInfoList



OR:

In
telecommunications Telecommunication is the transmission of information by various types of technologies over wire, radio, optical, or other electromagnetic systems. It has its origin in the desire of humans for communication over a distance greater than that fe ...
, RS-232 or Recommended Standard 232 is a
standard Standard may refer to: Symbols * Colours, standards and guidons, kinds of military signs * Standard (emblem), a type of a large symbol or emblem used for identification Norms, conventions or requirements * Standard (metrology), an object th ...
originally introduced in 1960 for
serial communication In telecommunication and data transmission, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are ...
transmission of data. It formally defines signals connecting between a ''DTE'' (''
data terminal equipment Data terminal equipment (DTE) is an end instrument that converts user information into signals or reconverts received signals. These can also be called tail circuits. A DTE device communicates with the data circuit-terminating equipment (DCE) ...
'') such as a
computer terminal A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. The teletype was an example of an early-day hard-copy terminal and ...
, and a ''DCE'' (''
data circuit-terminating equipment A data circuit-terminating equipment (DCE) is a device that sits between the data terminal equipment (DTE) and a data transmission circuit. It is also called data communication(s) equipment and data carrier equipment. Usually, the DTE device is ...
'' or ''
data communication equipment A data circuit-terminating equipment (DCE) is a device that sits between the data terminal equipment (DTE) and a data transmission circuit. It is also called data communication(s) equipment and data carrier equipment. Usually, the DTE device i ...
''), such as a
modem A modulator-demodulator or modem is a computer hardware device that converts data from a digital format into a format suitable for an analog transmission medium such as telephone or radio. A modem transmits data by Modulation#Digital modulati ...
. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and
pinout In electronics, a pinout (sometimes written "pin-out") is a cross-reference between the contacts, or ''pins'', of an electrical connector or electronic component, and their functions. "Pinout" now supersedes the term "basing diagram" that was the s ...
of connectors. The current version of the standard is ''TIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange'', issued in 1997. The RS-232 standard had been commonly used in
computer A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
serial port In computing, a serial port is a serial communication interface through which information transfers in or out sequentially one bit at a time. This is in contrast to a parallel port, which communicates multiple bits simultaneously in parallel. ...
s and is still widely used in industrial communication devices. A serial port complying with the RS-232 standard was once a standard feature of many types of computers.
Personal computer A personal computer (PC) is a multi-purpose microcomputer whose size, capabilities, and price make it feasible for individual use. Personal computers are intended to be operated directly by an end user, rather than by a computer expert or tec ...
s used them for connections not only to modems, but also to
printers Printer may refer to: Technology * Printer (publishing), a person or a company * Printer (computing), a hardware device * Optical printer for motion picture films People * Nariman Printer ( fl. c. 1940), Indian journalist and activist * Jam ...
,
computer mice A computer mouse (plural mice, sometimes mouses) is a hand-held pointing device that detects two-dimensional space, two-dimensional motion relative to a surface. This motion is typically translated into the motion of a pointer (user interface ...
, data storage,
uninterruptible power supplies An uninterruptible power supply or uninterruptible power source (UPS) is an electrical apparatus that provides emergency power to a load when the input power source or mains power fails. A UPS differs from an auxiliary or emergency power system ...
, and other peripheral devices. Compared with later interfaces such as
RS-422 RS-422, also known as TIA/EIA-422, is a technical standard originated by the Electronic Industries Alliance that specifies electrical characteristics of a digital signaling circuit. It was meant to be the foundation of a suite of standards that ...
,
RS-485 RS-485, also known as TIA-485(-A) or EIA-485, is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems. Electrical signaling is balanced, and multipoint systems are supported. The s ...
and
Ethernet Ethernet () is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 198 ...
, RS-232 has lower transmission speed, shorter maximum cable length, larger voltage swing, larger standard connectors, no multipoint capability and limited multidrop capability. In modern personal computers,
USB Universal Serial Bus (USB) is an industry standard that establishes specifications for cables, connectors and protocols for connection, communication and power supply (interfacing) between computers, peripherals and other computers. A broad ...
has displaced RS-232 from most of its peripheral interface roles. Thanks to their simplicity and past ubiquity, however, RS-232 interfaces are still used—particularly in industrial machines, networking equipment, and scientific instruments where a short-range, point-to-point, low-speed wired data connection is fully adequate.


Scope of the standard

The
Electronic Industries Association The Electronic Industries Alliance (EIA; until 1997 Electronic Industries Association) was an American standards and trade organization composed as an alliance of trade associations for electronics manufacturers in the United States. They develo ...
(EIA) standard RS-232-C as of 1969 defines: *Electrical signal characteristics such as
logic level In digital circuits, a logic level is one of a finite number of states that a digital signal can inhabit. Logic levels are usually represented by the voltage difference between the signal and ground, although other standards exist. The range ...
s,
baud rate In telecommunication and electronics, baud (; symbol: Bd) is a common unit of measurement of symbol rate, which is one of the components that determine the speed of communication over a data channel. It is the unit for symbol rate or modul ...
, timing, and
slew rate In electronics, slew rate is defined as the change of voltage or current, or any other electrical quantity, per unit of time. Expressed in SI units, the unit of measurement is volts/second or amperes/second, but is usually expressed in terms of m ...
of signals, voltage withstand level,
short-circuit A short circuit (sometimes abbreviated to short or s/c) is an electrical circuit that allows a current to travel along an unintended path with no or very low electrical impedance. This results in an excessive current flowing through the circuit. ...
behavior, and maximum load
capacitance Capacitance is the capability of a material object or device to store electric charge. It is measured by the change in charge in response to a difference in electric potential, expressed as the ratio of those quantities. Commonly recognized are ...
. *Interface mechanical characteristics, pluggable connectors and pin identification. *Functions of each circuit in the interface connector. *Standard subsets of interface circuits for selected telecom applications. The standard does not define such elements as the
character encoding Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to be Data storage, stored, Data communication, transmi ...
(i.e.
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
,
EBCDIC Extended Binary Coded Decimal Interchange Code (EBCDIC; ) is an eight-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. It descended from the code used with punched cards and the corresponding six- ...
, or others), the framing of characters (start or stop bits, etc.), transmission order of bits, or error detection protocols. The character format and transmission bit rate are set by the serial port hardware, typically a
UART A universal asynchronous receiver-transmitter (UART ) is a computer hardware device for asynchronous serial communication in which the data format and transmission speeds are configurable. It sends data bits one by one, from the least significan ...
, which may also contain circuits to convert the internal
logic level In digital circuits, a logic level is one of a finite number of states that a digital signal can inhabit. Logic levels are usually represented by the voltage difference between the signal and ground, although other standards exist. The range ...
s to RS-232 compatible signal levels. The standard does not define bit rates for transmission, except that it says it is intended for
bit rate In telecommunications and computing, bit rate (bitrate or as a variable ''R'') is the number of bits that are conveyed or processed per unit of time. The bit rate is expressed in the unit bit per second (symbol: bit/s), often in conjunction w ...
s lower than 20,000 bits per second.


History

RS-232 was first introduced in 1960 by the
Electronic Industries Association The Electronic Industries Alliance (EIA; until 1997 Electronic Industries Association) was an American standards and trade organization composed as an alliance of trade associations for electronics manufacturers in the United States. They develo ...
(EIA) as a ''Recommended Standard''.Metering Glossary
Landis + Gyr Tutorial (see ''EIA'')
The original DTEs were electromechanical
teletypewriter A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point (telecommunications), point-to-point and point- ...
s, and the original DCEs were (usually) modems. When electronic terminals (smart and dumb) began to be used, they were often designed to be interchangeable with teletypewriters, and so supported RS-232. Because the standard did not foresee the requirements of devices such as computers, printers, test instruments,
POS terminal The point of sale (POS) or point of purchase (POP) is the time and place at which a retail transaction is completed. At the point of sale, the merchant calculates the amount owed by the customer, indicates that amount, may prepare an invoice f ...
s, and so on, designers implementing an RS-232 compatible interface on their equipment often interpreted the standard idiosyncratically. The resulting common problems were non-standard pin assignment of circuits on connectors, and incorrect or missing control signals. The lack of adherence to the standards produced a thriving industry of
breakout box A breakout box is a piece of electrical test equipment used to support integration testing, expedite maintenance, and streamline the troubleshooting process at the system, subsystem, and component-level by simplifying the access to test signals. Br ...
es, patch boxes, test equipment, books, and other aids for the connection of disparate equipment. A common deviation from the standard was to drive the signals at a reduced voltage. Some manufacturers therefore built transmitters that supplied +5 V and −5 V and labeled them as "RS-232 compatible". Later personal computers (and other devices) started to make use of the standard so that they could connect to existing equipment. For many years, an RS-232-compatible port was a standard feature for
serial communication In telecommunication and data transmission, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are ...
s, such as modem connections, on many computers (with the computer acting as the DTE). It remained in widespread use into the late 1990s. In personal computer peripherals, it has largely been supplanted by other interface standards, such as USB. RS-232 is still used to connect older designs of peripherals, industrial equipment (such as PLCs),
console Console may refer to: Computing and video games * System console, a physical device to operate a computer ** Virtual console, a user interface for multiple computer consoles on one device ** Command-line interface, a method of interacting with ...
ports, and special purpose equipment. The standard has been renamed several times during its history as the sponsoring organization changed its name, and has been variously known as EIA RS-232, EIA 232, and, most recently as TIA 232. The standard continued to be revised and updated by the
Electronic Industries Association The Electronic Industries Alliance (EIA; until 1997 Electronic Industries Association) was an American standards and trade organization composed as an alliance of trade associations for electronics manufacturers in the United States. They develo ...
and since 1988 by the
Telecommunications Industry Association The Telecommunications Industry Association (TIA) is accredited by the American National Standards Institute (ANSI) to develop voluntary, consensus-based industry standards for a wide variety of Information and Communication Technologies (Inform ...
(TIA). Revision C was issued in a document dated August 1969. Revision D was issued in 1986. The current revision is ''TIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange'', issued in 1997. Changes since Revision C have been in timing and details intended to improve harmonization with the
CCITT The ITU Telecommunication Standardization Sector (ITU-T) is one of the three sectors (divisions or units) of the International Telecommunication Union (ITU). It is responsible for coordinating standards for telecommunications and Information Commu ...
standard , but equipment built to the current standard will interoperate with older versions. Related
ITU-T The ITU Telecommunication Standardization Sector (ITU-T) is one of the three sectors (divisions or units) of the International Telecommunication Union (ITU). It is responsible for coordinating standards for telecommunications and Information Commu ...
standards include V.24 (circuit identification) and (signal voltage and timing characteristics). In revision D of EIA-232, the D-subminiature connector was formally included as part of the standard (it was only referenced in the appendix of RS-232-C). The voltage range was extended to ±25 volts, and the circuit capacitance limit was expressly stated as 2500 pF. Revision E of EIA-232 introduced a new, smaller, standard D-shell 26-pin "Alt A" connector, and made other changes to improve compatibility with CCITT standards V.24, V.28 and ISO 2110. Specification document revision history: *EIA RS-232 (May 1960) "Interface Between Data Terminal Equipment & Data" *EIA RS-232-A (October 1963) *EIA RS-232-B (October 1965) *EIA RS-232-C (August 1969) "Interface Between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange" *EIA EIA-232-D (1986) *TIA TIA/EIA-232-E (1991) "Interface Between Data Terminal Equipment and Data Communications Equipment Employing Serial Binary Data Interchange" *TIA TIA/EIA-232-F (October 1997) *ANSI/TIA-232-F-1997 (R2002) *TIA TIA-232-F (R2012)


Limitations of the standard

Because RS-232 is used beyond the original purpose of interconnecting a terminal with a modem, successor standards have been developed to address the limitations. Issues with the RS-232 standard include: * The large voltage swings and requirement for positive and negative supplies increases power consumption of the interface and complicates power supply design. The voltage swing requirement also limits the upper speed of a compatible interface. * Single-ended signaling referred to a common signal ground limits the noise immunity and transmission distance. * Multi-drop connection among more than two devices is not defined. While multi-drop "work-arounds" have been devised, they have limitations in speed and compatibility. * The standard does not address the possibility of connecting a DTE directly to a DTE, or a DCE to a DCE.
Null modem Null modem is a communication method to directly connect two DTEs (computer, terminal, printer, etc.) using an RS-232 serial cable. The name stems from the historical use of RS-232 cables to connect two teleprinter devices or two modems in orde ...
cables can be used to achieve these connections, but these are not defined by the standard, and some such cables use different connections than others. * The definitions of the two ends of the link are asymmetric. This makes the assignment of the role of a newly developed device problematic; the designer must decide on either a DTE-like or DCE-like interface and which connector pin assignments to use. * The
Handshaking A handshake is a globally widespread, brief greeting or parting tradition in which two people grasp one of each other's like hands, in most cases accompanied by a brief up-and-down movement of the grasped hands. Customs surrounding handshakes a ...
and control lines of the interface are intended for the setup and takedown of a
dial-up Dial-up Internet access is a form of Internet access that uses the facilities of the public switched telephone network (PSTN) to establish a connection to an Internet service provider (ISP) by dialing a telephone number on a conventional telepho ...
communication circuit; in particular, the use of handshake lines for flow control is not reliably implemented in many devices. * No method is specified for sending power to a device. While a small amount of current can be extracted from the DTR and RTS lines, this is only suitable for low-power devices such as
mice A mouse ( : mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus' ...
. * The 25-pin D-sub connector recommended in the standard is large compared to current practice.


Role in modern personal computers

In the book ''
PC 97 The PC System Design Guide (also known as the PC-97, PC-98, PC-99, or PC 2001 specification) is a series of hardware design requirements and recommendations for IBM PC compatible personal computers, compiled by Microsoft and Intel Corporation duri ...
Hardware Design Guide'',
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
deprecated support for the RS-232 compatible serial port of the original IBM PC design. Today, RS-232 has mostly been replaced in personal computers by
USB Universal Serial Bus (USB) is an industry standard that establishes specifications for cables, connectors and protocols for connection, communication and power supply (interfacing) between computers, peripherals and other computers. A broad ...
for local communications. Advantages compared to RS-232 are that USB is faster, uses lower voltages, and has connectors that are simpler to connect and use. Disadvantages of USB compared to RS-232 are that USB is far less immune to
electromagnetic interference Electromagnetic interference (EMI), also called radio-frequency interference (RFI) when in the radio frequency spectrum, is a disturbance generated by an external source that affects an electrical circuit by electromagnetic induction, electros ...
(EMI) and that maximum cable length is much shorter (15 meters for RS-232 versus 3–5 meters for USB, depending on the USB version and use of active cables). In fields such as laboratory automation or surveying, RS-232 devices continue to be used. Some types of
programmable logic controller A programmable logic controller (PLC) or programmable controller is an industrial computer that has been ruggedized and adapted for the control of manufacturing processes, such as assembly lines, machines, robotic devices, or any activity tha ...
s,
variable-frequency drive A variable-frequency drive (VFD) is a type of motor drive used in electro-mechanical drive systems to control AC motor speed and torque by varying motor input frequency and, depending on topology, to control associated voltage or current variat ...
s,
servo drive A servo drive is an electronic amplifier used to power electric servomechanisms. A servo drive monitors the feedback signal from the servomechanism and continually adjusts for deviation from expected behavior. Function A servo drive receives a c ...
s, and
computerized numerical control Numerical control (also computer numerical control, and commonly called CNC) is the automation, automated control of machining tools (such as drills, lathes, Milling (machining), mills, Grinding machine, grinders, CNC wood router, routers and 3 ...
equipment are programmable via RS-232. Computer manufacturers have responded to this demand by re-introducing the
DE-9M The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smallest connectors used on computer systems. Description, no ...
connector on their computers or by making adapters available. RS-232 ports are also commonly used to communicate to headless systems such as
server Server may refer to: Computing *Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients Role * Waiting staff, those who work at a restaurant or a bar attending customers and su ...
s, where no monitor or keyboard is installed, during boot when
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
is not running yet and therefore no network connection is possible. A computer with an RS-232 serial port can communicate with the serial port of an
embedded system An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' as ...
(such as a router) as an alternative to monitoring over Ethernet.


Physical interface

In RS-232, user data is sent as a
time-series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Exa ...
of
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represente ...
s. Both
synchronous Synchronization is the coordination of events to operate a system in unison. For example, the conductor of an orchestra keeps the orchestra synchronized or ''in time''. Systems that operate with all parts in synchrony are said to be synchronou ...
and asynchronous transmissions are supported by the standard. In addition to the data circuits, the standard defines a number of control circuits used to manage the connection between the DTE and DCE. Each data or control circuit only operates in one direction, that is, signaling from a DTE to the attached DCE or the reverse. Because transmit data and receive data are separate circuits, the interface can operate in a
full duplex A duplex communication system is a point-to-point system composed of two or more connected parties or devices that can communicate with one another in both directions. Duplex systems are employed in many communications networks, either to allow ...
manner, supporting concurrent data flow in both directions. The standard does not define character framing within the data stream or character encoding.


Voltage levels

The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels for the data transmission and the control signal lines. Valid signals are either in the range of +3 to +15 volts or the range −3 to −15 volts with respect to the "Common Ground" (GND) pin; consequently, the range between −3 to +3 volts is not a valid RS-232 level. For data transmission lines (TxD, RxD, and their secondary channel equivalents), logic one is represented as a negative voltage and the signal condition is called "mark". Logic zero is signaled with a positive voltage and the signal condition is termed "space". Control signals have the opposite polarity: the asserted or active state is positive voltage and the de-asserted or inactive state is negative voltage. Examples of control lines include request to send (RTS), clear to send (CTS),
data terminal ready Data Terminal Ready (DTR) is a control signal in RS-232 serial communications, transmitted from data terminal equipment (DTE), such as a computer, to data communications equipment (DCE), for example a modem, to indicate that the terminal is ready f ...
(DTR), and data set ready (DSR). The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5  V, ±10 V, ±12 V, and ±15 V are all commonly seen depending on the voltages available to the line driver circuit. Some RS-232 driver chips have inbuilt circuitry to produce the required voltages from a 3 or 5  volt supply. RS-232 drivers and receivers must be able to withstand indefinite short circuits to the ground or to any voltage level up to ±25 volts. The
slew rate In electronics, slew rate is defined as the change of voltage or current, or any other electrical quantity, per unit of time. Expressed in SI units, the unit of measurement is volts/second or amperes/second, but is usually expressed in terms of m ...
, or how fast the signal changes between levels, is also controlled. Because the voltage levels are higher than logic levels typically used by integrated circuits, special intervening driver circuits are required to translate logic levels. These also protect the device's internal circuitry from short circuits or transients that may appear on the RS-232 interface, and provide sufficient current to comply with the slew rate requirements for data transmission. Because both ends of the RS-232 circuit depend on the ground pin being zero volts, problems will occur when connecting machinery and computers where the voltage between the ground pin on one end, and the ground pin on the other is not zero. This may also cause a hazardous ground loop. Use of a common ground limits RS-232 to applications with relatively short cables. If the two devices are far enough apart or on separate power systems, the local ground connections at either end of the cable will have differing voltages; this difference will reduce the noise margin of the signals. Balanced, differential serial connections such as
RS-422 RS-422, also known as TIA/EIA-422, is a technical standard originated by the Electronic Industries Alliance that specifies electrical characteristics of a digital signaling circuit. It was meant to be the foundation of a suite of standards that ...
or
RS-485 RS-485, also known as TIA-485(-A) or EIA-485, is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems. Electrical signaling is balanced, and multipoint systems are supported. The s ...
can tolerate larger ground voltage differences because of the differential signaling. Unused interface signals terminated to the ground will have an undefined logic state. Where it is necessary to permanently set a control signal to a defined state, it must be connected to a voltage source that asserts the logic 1 or logic 0 levels, for example with a pullup resistor. Some devices provide test voltages on their interface connectors for this purpose.


Connectors

RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Circuit-terminating Equipment (DCE); this defines at each device which wires will be sending and receiving each signal. According to the standard, male connectors have DTE pin functions, and female connectors have DCE pin functions. Other devices may have any combination of connector gender and pin definitions. Many terminals were manufactured with female connectors but were sold with a cable with male connectors at each end; the terminal with its cable satisfied the recommendations in the standard. The standard recommends the
D-subminiature The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smallest connectors used on computer systems. Description, n ...
25-pin connector up to revision C, and makes it mandatory as of revision D. Most devices only implement a few of the twenty signals specified in the standard, so connectors and cables with fewer pins are sufficient for most connections, more compact, and less expensive. Personal computer manufacturers replaced the DB-25M connector with the smaller
DE-9M The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smallest connectors used on computer systems. Description, no ...
connector. This connector, with a different pinout (see Serial port pinouts), is prevalent for personal computers and associated devices. Presence of a 25-pin D-sub connector does not necessarily indicate an RS-232-C compliant interface. For example, on the original IBM PC, a male D-sub was an RS-232-C DTE port (with a non-standard
current loop In electrical signalling an analog current loop is used where a device must be monitored or controlled remotely over a pair of conductors. Only one current level can be present at any time. A major application of current loops is the industry de ...
interface on reserved pins), but the female D-sub connector on the same PC model was used for the parallel "Centronics" printer port. Some personal computers put non-standard voltages or signals on some pins of their serial ports.


Pinouts

The following table lists commonly used RS-232 signals and pin assignments: ''Signal Ground'' is a common return for the other connections; it appears on two pins in the Yost standard but is the same signal. The DB-25 connector includes a second ''Protective Ground'' on pin 1, which is intended to be connected by each device to its own frame ground or similar. Connecting Protective Ground to Signal Ground is a common practice but not recommended. Note that EIA/TIA 561 combines DSR and RI, and the Yost standard combines DSR and DCD.


Cables

The standard does not define a maximum cable length, but instead defines the maximum capacitance that a compliant drive circuit must tolerate. A widely used rule of thumb indicates that cables more than long will have too much capacitance, unless special cables are used. By using low-capacitance cables, communication can be maintained over larger distances up to about . For longer distances, other signal standards, such as
RS-422 RS-422, also known as TIA/EIA-422, is a technical standard originated by the Electronic Industries Alliance that specifies electrical characteristics of a digital signaling circuit. It was meant to be the foundation of a suite of standards that ...
, are better suited for higher speeds. Since the standard definitions are not always correctly applied, it is often necessary to consult documentation, test connections with a
breakout box A breakout box is a piece of electrical test equipment used to support integration testing, expedite maintenance, and streamline the troubleshooting process at the system, subsystem, and component-level by simplifying the access to test signals. Br ...
, or use trial and error to find a cable that works when interconnecting two devices. Connecting a fully standard-compliant DCE device and DTE device would use a cable that connects identical pin numbers in each connector (a so-called "straight cable"). " Gender changers" are available to solve gender mismatches between cables and connectors. Connecting devices with different types of connectors requires a cable that connects the corresponding pins according to the table below. Cables with 9 pins on one end and 25 on the other are common. Manufacturers of equipment with 8P8C connectors usually provide a cable with either a DB-25 or DE-9 connector (or sometimes interchangeable connectors so they can work with multiple devices). Poor-quality cables can cause false signals by
crosstalk In electronics, crosstalk is any phenomenon by which a signal transmitted on one circuit or channel of a transmission system creates an undesired effect in another circuit or channel. Crosstalk is usually caused by undesired capacitive, induc ...
between data and control lines (such as
Ring Indicator In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such ...
). If a given cable will not allow a data connection, especially if a gender changer is in use, a
null modem Null modem is a communication method to directly connect two DTEs (computer, terminal, printer, etc.) using an RS-232 serial cable. The name stems from the historical use of RS-232 cables to connect two teleprinter devices or two modems in orde ...
cable may be necessary. Gender changers and null modem cables are not mentioned in the standard, so there is no officially sanctioned design for them.


Data and control signals

The following table lists commonly used RS-232 signals (called "circuits" in the specifications) and their pin assignments on the recommended DB-25 connectors. (See Serial port pinouts for other commonly used connectors not defined by the standard.) The signals are named from the standpoint of the DTE. The ground pin is a common return for the other connections, and establishes the "zero" voltage to which voltages on the other pins are referenced. The DB-25 connector includes a second "protective ground" on pin 1; this is connected internally to equipment frame ground, and should not be connected in the cable or connector to signal ground.


Ring Indicator

''Ring Indicator'' (RI) is a signal sent from the DCE to the DTE device. It indicates to the terminal device that the phone line is ringing. In many computer serial ports, a
hardware interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
is generated when the RI signal changes state. Having support for this hardware interrupt means that a program or operating system can be informed of a change in state of the RI pin, without requiring the software to constantly "poll" the state of the pin. RI does not correspond to another signal that carries similar information the opposite way. On an external modem the status of the Ring Indicator pin is often coupled to the "AA" (auto answer) light, which flashes if the RI signal has detected a ring. The asserted RI signal follows the ringing pattern closely, which can permit software to detect
distinctive ring Distinctive ring, marketed under a variety of names, is a service offered by a telephone company that establishes additional telephone numbers on the same line as an existing number, each number ringing with a distinctive ringing pattern. Typically ...
patterns. The Ring Indicator signal is used by some older
uninterruptible power supplies An uninterruptible power supply or uninterruptible power source (UPS) is an electrical apparatus that provides emergency power to a load when the input power source or mains power fails. A UPS differs from an auxiliary or emergency power system ...
(UPSs) to signal a power failure state to the computer. Certain personal computers can be configured for
wake-on-ring {{short description, Signal that activates a device via a telephone connection Wake-on-Ring (WOR), sometimes referred to as Wake-on-Modem (WOM), is a specification that allows supported computers and devices to "wake up" or turn on from a sleeping, ...
, allowing a computer that is suspended to answer a phone call.


RTS, CTS, and RTR

The Request to Send (RTS) and Clear to Send (CTS) signals were originally defined for use with half-duplex (one direction at a time) modems such as the
Bell 202 The Bell 202 modem was an early (1976) modem standard developed by the Bell System. It specifies audio frequency-shift keying (AFSK) to encode and transfer data at a rate of 1200 bits per second, half-duplex. It has separate sets of circuits fo ...
. These modems disable their transmitters when not required and must transmit a synchronization preamble to the receiver when they are re-enabled. The DTE asserts RTS to indicate a desire to transmit to the DCE, and in response the DCE asserts CTS to grant permission, once synchronization with the DCE at the far end is achieved. Such modems are no longer in common use. There is no corresponding signal that the DTE could use to temporarily halt incoming data from the DCE. Thus RS-232's use of the RTS and CTS signals, per the older versions of the standard, is asymmetric. This scheme is also employed in present-day RS-232 to
RS-485 RS-485, also known as TIA-485(-A) or EIA-485, is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems. Electrical signaling is balanced, and multipoint systems are supported. The s ...
converters. RS-485 is a multiple-access bus on which only one device can transmit at a time, a concept that is not provided for in RS-232. The RS-232 device asserts RTS to tell the converter to take control of the RS-485 bus so that the converter, and thus the RS-232 device, can send data onto the bus. Modern communications environments use full-duplex (both directions simultaneously) modems. In that environment, DTEs have no reason to deassert RTS. However, due to the possibility of changing line quality, delays in processing of data, etc., there is a need for symmetric, bidirectional flow control. A symmetric alternative providing flow control in both directions was developed and marketed in the late 1980s by various equipment manufacturers. It redefined the RTS signal to mean that the DTE is ready to receive data from the DCE. This scheme was eventually codified in version RS-232-E (actually TIA-232-E by that time) by defining a new signal, "RTR (Ready to Receive)", which is CCITT V.24 circuit 133. TIA-232-E and the corresponding international standards were updated to show that circuit 133, when implemented, shares the same pin as RTS (Request to Send), and that when 133 is in use, RTS is assumed by the DCE to be asserted at all times. In this scheme, commonly called "RTS/CTS flow control" or "RTS/CTS handshaking" (though the technically correct name would be "RTR/CTS"), the DTE asserts RTS whenever it is ready to receive data from the DCE, and the DCE asserts CTS whenever it is ready to receive data from the DTE. Unlike the original use of RTS and CTS with half-duplex modems, these two signals operate independently from one another. This is an example of
hardware flow control In data communications, flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver. Flow control should be distinguished from congestion control, which is us ...
. However, "hardware flow control" in the description of the options available on an RS-232-equipped device does not always mean RTS/CTS handshaking. Equipment using this protocol must be prepared to buffer some extra data, since the remote system may have begun transmitting just before the local system de-asserts RTR.


3-wire and 5-wire RS-232

A minimal "3-wire" RS-232 connection consisting only of transmit data, receive data, and ground, is commonly used when the full facilities of RS-232 are not required. Even a two-wire connection (data and ground) can be used if the data flow is one way (for example, a digital postal scale that periodically sends a weight reading, or a GPS receiver that periodically sends position, if no configuration via RS-232 is necessary). When only hardware flow control is required in addition to two-way data, the RTS and CTS lines are added in a 5-wire version.


Seldom-used features

The EIA-232 standard specifies connections for several features that are not used in most implementations. Their use requires 25-pin connectors and cables.


Signal rate selection

The DTE or DCE can specify use of a "high" or "low" signaling rate. The rates, as well as which device will select the rate, must be configured in both the DTE and DCE. The prearranged device selects the high rate by setting pin 23 to ON.


Loopback testing

Many DCE devices have a
loopback Loopback (also written loop-back) is the routing of electronic signals or digital data streams back to their source without intentional processing or modification. It is primarily a means of testing the communications infrastructure. There are m ...
capability used for testing. When enabled, signals are echoed back to the sender rather than being sent on to the receiver. If supported, the DTE can signal the local DCE (the one it is connected to) to enter loopback mode by setting pin 18 to ON, or the remote DCE (the one the local DCE is connected to) to enter loopback mode by setting pin 21 to ON. The latter tests the communications link, as well as both DCEs. When the DCE is in test mode, it signals the DTE by setting pin 25 to ON. A commonly used version of loopback testing does not involve any special capability of either end. A hardware loopback is simply a wire connecting complementary pins together in the same connector (see ''
loopback Loopback (also written loop-back) is the routing of electronic signals or digital data streams back to their source without intentional processing or modification. It is primarily a means of testing the communications infrastructure. There are m ...
''). Loopback testing is often performed with a specialized DTE called a
bit error rate test In digital transmission, the number of bit errors is the number of received bits of a data stream over a communication channel that have been altered due to noise, interference, distortion or bit synchronization errors. The bit error rate (BER ...
er (or BERT).


Timing signals

Some synchronous devices provide a
clock signal In electronics and especially synchronous digital circuits, a clock signal (historically also known as ''logic beat'') oscillates between a high and a low state and is used like a metronome to coordinate actions of digital circuits. A clock sign ...
to synchronize data transmission, especially at higher data rates. Two timing signals are provided by the DCE on pins 15 and 17. Pin 15 is the transmitter clock, or send timing (ST); the DTE puts the next bit on the data line (pin 2) when this clock transitions from OFF to ON (so it is stable during the ON to OFF transition when the DCE registers the bit). Pin 17 is the receiver clock, or receive timing (RT); the DTE reads the next bit from the data line (pin 3) when this clock transitions from ON to OFF. Alternatively, the DTE can provide a clock signal, called transmitter timing (TT), on pin 24 for transmitted data. Data is changed when the clock transitions from OFF to ON, and read during the ON to OFF transition. TT can be used to overcome the issue where ST must traverse a cable of unknown length and delay, clock a bit out of the DTE after another unknown delay, and return it to the DCE over the same unknown cable delay. Since the relation between the transmitted bit and TT can be fixed in the DTE design, and since both signals traverse the same cable length, using TT eliminates the issue. TT may be generated by looping ST back with an appropriate phase change to align it with the transmitted data. ST loop back to TT lets the DTE use the DCE as the frequency reference, and correct the clock to data timing. Synchronous clocking is required for such protocols as SDLC,
HDLC High-Level Data Link Control (HDLC) is a bit-oriented code-transparent synchronous data link layer protocol developed by the International Organization for Standardization (ISO). The standard for HDLC is ISO/IEC 13239:2002. HDLC provides both c ...
, and
X.25 X.25 is an ITU-T standard protocol suite for packet-switched data communication in wide area networks (WAN). It was originally defined by the International Telegraph and Telephone Consultative Committee (CCITT, now ITU-T) in a series of drafts ...
.


Secondary channel

A secondary data channel, identical in capability to the primary channel, can optionally be implemented by the DTE and DCE devices. Pin assignments are as follows:


Related standards

Other serial signaling standards may not interoperate with standard-compliant RS-232 ports. For example, using the
TTL level In digital circuits, a logic level is one of a finite number of states that a digital signal can inhabit. Logic levels are usually represented by the voltage difference between the signal and ground, although other standards exist. The range ...
s of near +5 V and 0 V puts the mark level in the undefined area of the standard. Such levels are sometimes used with
GPS The Global Positioning System (GPS), originally Navstar GPS, is a Radionavigation-satellite service, satellite-based radionavigation system owned by the United States government and operated by the United States Space Force. It is one of t ...
receivers and depth finders. A 20 mA
current loop In electrical signalling an analog current loop is used where a device must be monitored or controlled remotely over a pair of conductors. Only one current level can be present at any time. A major application of current loops is the industry de ...
uses the absence of 20 mA current for high, and the presence of current in the loop for low; this signaling method is often used for long-distance and optically isolated links. Connection of a current-loop device to a compliant RS-232 port requires a level translator. Current-loop devices can supply voltages in excess of the must-withstand voltage limits of a compliant device. The original IBM PC serial port card implemented a 20 mA current-loop interface, which was never emulated by other suppliers of plug-compatible equipment. Other serial interfaces similar to RS-232: *
RS-422 RS-422, also known as TIA/EIA-422, is a technical standard originated by the Electronic Industries Alliance that specifies electrical characteristics of a digital signaling circuit. It was meant to be the foundation of a suite of standards that ...
– a high-speed system similar to RS-232 but with
differential signaling Differential signalling is a method for electrically transmitting information using two complementary signals. The technique sends the same electrical signal as a differential pair of signals, each in its own conductor. The pair of conducto ...
*
RS-423 RS-423, also known as TIA/EIA-423, is a technical standard originated by the Electronic Industries Alliance that specifies electrical characteristics of a digital signaling circuit. Although it was originally intended as a successor to RS-232C of ...
– a high-speed system similar to RS-422 but with unbalanced signaling *
RS-449 The RS-449 specification, also known as EIA-449 or TIA-449, defines the functional and mechanical characteristics of the interface between data terminal equipment, typically a computer, and data communications equipment, typically a modem or term ...
– a functional and mechanical interface that used RS-422 and RS-423 signals; never caught on like RS-232 and was withdrawn by the EIA *
RS-485 RS-485, also known as TIA-485(-A) or EIA-485, is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems. Electrical signaling is balanced, and multipoint systems are supported. The s ...
– a descendant of RS-422 that can be used as a bus in multidrop configurations *
MIL-STD-188 MIL-STD-188 is a series of U.S. military standards relating to telecommunications. Purpose Faced with "past technical deficiencies in telecommunications systems and equipment and software…that were traced to basic inadequacies in the applicat ...
– a system like RS-232 but with better impedance and rise time control *
EIA-530 Currently known as TIA-530-A, but often called EIA-530, or RS-530, is a balanced serial interface standard that generally uses a 25-pin connector, originally created by the Telecommunications Industry Association. Finalized in 1987 (revision A f ...
– a high-speed system using RS-422 or RS-423 electrical properties in an EIA-232 pinout configuration, thus combining the best of both; supersedes RS-449 * EIA/TIA-561 – defines RS-232 pinouts for eight-position, eight-contact (8P8C) modular connectors (which may be improperly called RJ45 connectors) * EIA/TIA-562 – low-voltage version of EIA/TIA-232 *TIA-574 – standardizes the 9-pin D-subminiature connector pinout for use with EIA-232 electrical signalling, as originated on the IBM PC/AT * EIA/TIA-694 – similar to TIA/EIA-232-F but with support for higher data rates up to 512 kbit/s


Development tools

When developing or troubleshooting systems using RS-232, close examination of hardware signals can be important to find problems. This can be done using simple devices with LEDs that indicate the logic levels of data and control signals. "Y" cables may be used to allow using another serial port to monitor all traffic on one direction. A serial line analyzer is a device similar to a
logic analyzer A logic analyzer is an electronic instrument that captures and displays multiple signals from a digital system or digital circuit. A logic analyzer may convert the captured data into timing diagrams, protocol decodes, state machine traces, a ...
but specialized for RS-232's voltage levels, connectors, and, where used, clock signals; it collects, stores, and displays the data and control signals, allowing developers to view them in detail. Some simply display the signals as waveforms; more elaborate versions include the ability to decode characters in
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
or other common codes and to interpret common protocols used over RS-232 such as SDLC,
HDLC High-Level Data Link Control (HDLC) is a bit-oriented code-transparent synchronous data link layer protocol developed by the International Organization for Standardization (ISO). The standard for HDLC is ISO/IEC 13239:2002. HDLC provides both c ...
,
DDCMP Digital Data Communications Message Protocol (DDCMP) is a byte-oriented communications protocol devised by Digital Equipment Corporation in 1974 to allow communication over point-to-point network links for the company's DECnet Phase I network pr ...
, and
X.25 X.25 is an ITU-T standard protocol suite for packet-switched data communication in wide area networks (WAN). It was originally defined by the International Telegraph and Telephone Consultative Committee (CCITT, now ITU-T) in a series of drafts ...
. Serial line analyzers are available as standalone units, as software and interface cables for general-purpose
logic analyzer A logic analyzer is an electronic instrument that captures and displays multiple signals from a digital system or digital circuit. A logic analyzer may convert the captured data into timing diagrams, protocol decodes, state machine traces, a ...
s and
oscilloscope An oscilloscope (informally a scope) is a type of electronic test instrument that graphically displays varying electrical voltages as a two-dimensional plot of one or more signals as a function of time. The main purposes are to display repetiti ...
s, and as programs that run on common personal computers and devices.


See also

*
Comparison of synchronous and asynchronous signalling Synchronous and asynchronous transmissions are two different methods of transmission synchronization. Synchronous transmissions are synchronized by an external clock, while asynchronous transmissions are synchronized by special signals along th ...


References


Further reading

* * * * *


External links

* * {{DEFAULTSORT:Rs-232 Telecommunications equipment Computer hardware standards Networking standards EIA standards Computer-related introductions in 1960