RS-232
Encyclopedia
In telecommunications, RS-232 (Recommended Standard 232) is the traditional name for a series of standards for serial
Serial communication
In telecommunication and computer science, 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 sent as a whole, on a link with several parallel channels...

 binary single-ended data
Data transmission
Data transmission, digital transmission, or digital communications is the physical transfer of data over a point-to-point or point-to-multipoint communication channel. Examples of such channels are copper wires, optical fibres, wireless communication channels, and storage media...

 and control signals connecting between a DTE (Data Terminal Equipment
Data terminal equipment
Data Terminal Equipment 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...

) and a DCE (Data Circuit-terminating Equipment
Data circuit-terminating equipment
A data circuit-terminating equipment is a device that sits between the data terminal equipment and a data transmission circuit. It is also called data communications equipment and data carrier equipment...

). It is commonly used in computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 serial port
Serial port
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...

s. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pin out 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.

An RS-232 port was once a standard feature of a personal computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

 for connections to modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...

s, printers, mice
Mouse (computing)
In computing, a mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons...

, data storage, un-interruptible power supplies, and other peripheral devices. However, the limited transmission speed, relatively large voltage swing, and large standard connectors motivated development of the universal serial bus which has displaced RS-232 from most of its peripheral interface roles. Many modern personal computers have no RS-232 ports and must use an external converter to connect to older peripherals. Some RS-232 devices are still found especially in industrial machines or scientific instruments.

Scope of the standard

The Electronic Industries Association
Electronic Industries Alliance
The Electronic Industries Alliance was a standards and trade organization composed as an alliance of trade associations for electronics manufacturers in the United States. They developed standards to ensure the equipment of different manufacturers was compatible and interchangeable...

 (EIA) standard RS-232-C as of 1969 defines:
  • Electrical signal characteristics such as voltage levels, signaling rate
    Data signaling rate
    In telecommunication, data signaling rate , also known as gross bit rate, is the aggregate rate at which data pass a point in the transmission path of a data transmission system.Notes:#The DSR is usually expressed in bits per second....

    , timing and slew-rate
    Slew rate
    In electronics, the slew rate represents the maximum rate of change of a signal at any point in a circuit.Limitations in slew rate capability can give rise to non linear effects in electronic amplifiers...

     of signals, voltage withstand level, short-circuit
    Short circuit
    A short circuit in an electrical circuit that allows a current to travel along an unintended path, often where essentially no electrical impedance is encountered....

     behavior, and maximum load capacitance
    Capacitance
    In electromagnetism and electronics, capacitance is the ability of a capacitor to store energy in an electric field. Capacitance is also a measure of the amount of electric potential energy stored for a given electric potential. A common form of energy storage device is a parallel-plate capacitor...

    .
  • 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
  • character encoding
    Character encoding
    A character encoding system consists of a code that pairs each character from a given repertoire with something else, such as a sequence of natural numbers, octets or electrical pulses, in order to facilitate the transmission of data through telecommunication networks or storage of text in...

     (for example, ASCII
    ASCII
    The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

    , Baudot code
    Baudot code
    The Baudot code, invented by Émile Baudot, is a character set predating EBCDIC and ASCII. It was the predecessor to the International Telegraph Alphabet No 2 , the teleprinter code in use until the advent of ASCII. Each character in the alphabet is represented by a series of bits, sent over a...

     or EBCDIC
    EBCDIC
    Extended Binary Coded Decimal Interchange Code is an 8-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems....

    )
  • the framing of characters in the data stream (bits per character, start/stop bits, parity
    Parity bit
    A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is even or odd. Parity bits are used as the simplest form of error detecting code....

    )
  • protocols for error detection or algorithms for data compression
  • bit rates for transmission, although the standard says it is intended for bit rate
    Bit rate
    In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time....

    s lower than 20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above
  • power supply to external devices.


Details of character format and transmission bit rate are controlled by the serial port
Serial port
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...

 hardware, often a single integrated circuit
Integrated circuit
An integrated circuit or monolithic integrated circuit is an electronic circuit manufactured by the patterned diffusion of trace elements into the surface of a thin substrate of semiconductor material...

 called a UART that converts data from parallel to asynchronous start-stop
Asynchronous start-stop
Asynchronous serial communication describes an asynchronous, serial transmission protocol in which a start signal is sent prior to each byte, character or code word and a stop signal is sent after each code word...

 serial form.
Details of voltage levels, slew rate, and short-circuit behavior are typically controlled by a line driver
Line driver
In electronics, a line driver is an amplifier used to improve the strength of an analog or digital signal at its source by driving the input to the transmission line with a higher than normal signal level. This increases the quality of a transmission over a long run of cable...

 that converts from the UART's logic level
Logic level
In digital circuits, a logic level is one of a finite number of states that a signal can have. Logic levels are usually represented by the voltage difference between the signal and ground , although other standards exist...

s to RS-232 compatible signal levels, and a receiver that converts from RS-232 compatible signal levels to the UART's logic levels.

History

RS-232 was first introduced in 1962. The original DTEs were electromechanical teletypewriters
Teleprinter
A teleprinter is a electromechanical typewriter that can be used to communicate typed messages from point to point and point to multipoint over a variety of communication channels that range from a simple electrical connection, such as a pair of wires, to the use of radio and microwave as the...

, and the original DCEs were (usually) modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...

s. When electronic terminals
Computer terminal
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system...

 (smart and dumb) began to be used, they were often designed to be interchangeable with teletypes, and so supported RS-232. The C revision of the standard was issued in 1969 in part to accommodate the electrical characteristics of these devices.

Since application to devices such as computers, printers, test instruments, and so on was not considered by the standard, designers implementing an RS-232 compatible interface on their equipment often interpreted the requirements idiosyncratically. 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 boxes, 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 computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

s (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
Serial communication
In telecommunication and computer science, 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 sent as a whole, on a link with several parallel channels...

s, such as modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...

 connections, on many computers. 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 PLC
Programmable logic controller
A programmable logic controller or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are used in many industries and machines...

s), console
System console
The system console, root console or simply console is the text entry and display device for system administration messages, particularly those from the BIOS or boot loader, the kernel, from the init system and from the system logger...

 ports, and special purpose equipment, such as a cash drawer for a cash register.

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 Alliance
Electronic Industries Alliance
The Electronic Industries Alliance was a standards and trade organization composed as an alliance of trade associations for electronics manufacturers in the United States. They developed standards to ensure the equipment of different manufacturers was compatible and interchangeable...

 and since 1988 by the Telecommunications Industry Association
Telecommunications Industry Association
The Telecommunications Industry Association is accredited by the American National Standards Institute to develop voluntary, consensus-based industry standards for a wide variety of ICT products, and currently represents nearly 400 companies...

 (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
ITU-T
The ITU Telecommunication Standardization Sector is one of the three sectors of the International Telecommunication Union ; it coordinates standards for telecommunications....

 standard V.24, but equipment built to the current standard will interoperate with older versions.

Related ITU-T
ITU-T
The ITU Telecommunication Standardization Sector is one of the three sectors of the International Telecommunication Union ; it coordinates standards for telecommunications....

 standards include V.24 (circuit identification) and V.28 (signal voltage and timing characteristics).

Limitations of the standard

Because the application of RS-232 has extended far 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.
  • Asymmetrical definitions of the two ends of the link make 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
    Handshaking
    In information technology, telecommunications, and related fields, handshaking is an automated process of negotiation that dynamically sets parameters of a communications channel established between two entities before normal communication over the channel begins...

     and control lines of the interface are intended for the setup and takedown of a dial-up communication circuit; in particular, the use of handshake lines for flow control
    Flow control
    In data communications, flow control is the process of managing the pacing of data transmission between two nodes to prevent a fast sender from outrunning a slow receiver. It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with...

     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
    Mouse (computing)
    In computing, a mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons...

    .
  • The 25-way connector recommended in the standard is large compared to current practice.

Role in modern personal computers


In the book, PC 97 Hardware Design Guide, Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 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 for local communications. Compared with RS-232, USB is faster, uses lower voltages, and has connectors that are simpler to connect and use. However, USB is limited by standard to no more than 5 meters of cable, thus favoring RS-232 when longer distances are needed. Both standards have software support in popular operating systems. USB is designed to make it easy for device drivers to communicate with hardware. However, there is no direct analog to the terminal programs used to let users communicate directly with serial ports. USB is more complex than the RS-232 standard because it includes a protocol for transferring data to devices. This requires more software to support the protocol used. RS-232 only standardizes the voltage of signals and the functions of the physical interface pins. Serial ports of personal computers are also sometimes used to directly control various hardware devices, such as relay
Relay
A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal , or where several circuits must be controlled...

s or lamps, since the control lines of the interface can be easily manipulated by software. This isn't feasible with USB, which requires some form of receiver to decode the serial data.

As an alternative, USB docking ports are available which can provide connectors for a keyboard, mouse, one or more serial ports, and one or more parallel port
Parallel port
A parallel port is a type of interface found on computers for connecting various peripherals. In computing, a parallel port is a parallel communication physical interface. It is also known as a printer port or Centronics port...

s. Corresponding device drivers are required for each USB-connected device to allow programs to access these USB-connected devices as if they were the original directly connected peripherals. Devices that convert USB to RS-232 may not work with all software on all personal computers and may cause a reduction in bandwidth along with higher latency.

Personal computers may use a serial port to interface to devices such as uninterruptible power supplies
Uninterruptible power supply
An uninterruptible power supply, also uninterruptible power source, UPS or battery/flywheel backup, is an electrical apparatus that provides emergency power to a load when the input power source, typically mains power, fails...

. In some cases, serial data is not exchanged, but the control lines are used to signal conditions such as loss of power or low battery alarms.

Many fields (for example, laboratory automation, surveying) provide a continued demand for RS-232 I/O due to sustained use of very expensive but aging equipment. It is often far cheaper to continue to use RS-232 than it is to replace the equipment. Additionally, modern industrial automation equipment, such as PLCs
Programmable logic controller
A programmable logic controller or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are used in many industries and machines...

, VFDs, servo drive
Servo drive
A servo drive is a special 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:...

s, and CNC equipment
Numerical control
Numerical control refers to the automation of machine tools that are operated by abstractly programmed commands encoded on a storage medium, as opposed to controlled manually via handwheels or levers, or mechanically automated via cams alone...

 are programmable via RS-232. Some manufacturers have responded to this demand: Toshiba re-introduced the DE-9M
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 smaller connectors used on computer systems....

 connector on the Tecra
Toshiba Tecra
Toshiba currently markets the Tecra series as performance business laptops. Although the Toshiba_Satellite series and the Satellite Pro series feature several notebook models, the Tecra series currently includes three notebook models...

 laptop.

Serial ports with RS-232 are also commonly used to communicate to headless systems
Headless system
A headless system is a computer system or device that has been configured to operate without a monitor , keyboard and mouse...

 such as servers
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

, where no monitor or keyboard is installed, during boot when operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 isn't running yet and therefore no network connection is possible. An RS-232 serial port can communicate to some embedded system
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...

s such as routers as an alternative to network mode of monitoring.

Standard details

In RS-232, user data is sent as a time-series of bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

s. Both synchronous 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. Since transmit data and receive data are separate circuits, the interface can operate in a full duplex 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 plus or minus 3 to 15 volts; the ±3 V range near zero volts is not a valid RS-232 level. 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 power supplies
Power supply
A power supply is a device that supplies electrical energy to one or more electric loads. The term is most commonly applied to devices that convert one form of electrical energy to another, though it may also refer to devices that convert another form of energy to electrical energy...

 available within a device. RS-232 drivers and receivers must be able to withstand indefinite short circuit to ground or to any voltage level up to ±25 volts. The slew rate
Slew rate
In electronics, the slew rate represents the maximum rate of change of a signal at any point in a circuit.Limitations in slew rate capability can give rise to non linear effects in electronic amplifiers...

, or how fast the signal changes between levels, is also controlled.

For data transmission lines (TxD, RxD and their secondary channel equivalents) logic one is defined as a negative voltage, the signal condition is called marking, and has the functional significance. Logic zero is positive and the signal condition is termed spacing. Control signals are logically inverted with respect to what one sees on the data transmission lines. When one of these signals is active, the voltage on the line will be between +3 to +15 volts. The inactive state for these signals is the opposite voltage condition, between −3 and −15 volts. Examples of control lines include request to send (RTS), clear to send (CTS), data terminal ready
Data Terminal Ready
Data Terminal Ready, abbreviated as DTR, is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem...

 (DTR), and data set ready (DSR).

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
Ground loop (electricity)
In an electrical system, a ground loop usually refers to a current, almost always unwanted, in a conductor connecting two points that are supposed to be at the same potential, often ground, but are actually at different potentials. Ground loops created by improperly designed or improperly installed...

. 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 USB, RS-422 and RS-485 can tolerate larger ground voltage differences because of the differential signaling.

Unused interface signals terminated to 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 level. 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 Communication Equipment (DCE); this defines at each device which wires will be sending and receiving each signal. The standard recommended but did not make mandatory the D-subminiature
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 smaller connectors used on computer systems....

 25 pin connector. In general and according to the standard, terminals and computers have male connectors with DTE pin functions, and modems have female connectors with DCE pin functions. Other devices may have any combination of connector gender and pin definitions.
Many terminals were manufactured with female terminals but were sold with a cable with male connectors at each end; the terminal with its cable satisfied the recommendations in the standard.

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
Current loop
A current loop describes two different electrical signalling schemes.- Digital :For digital serial communications, a current loop is a communication interface that uses current instead of voltage for signaling...

 interface on reserved pins), but the female D-sub connector was used for a parallel Centronics
Centronics
Centronics Data Computer Corporation was a pioneering American manufacturer of computer printers, now remembered primarily for the parallel interface that bears its name.-The beginning:Centronics began as a division of Wang Laboratories...

 printer port. Some personal computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

s put non-standard voltages or signals on some pins of their serial ports.

The standard specifies 20 different signal connections. Since most devices use only a few signals, smaller connectors can often be used.

Pinouts

The following table lists commonly used RS-232 signals and pin assignments. See serial port
Serial port
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...

 for non-standard variations including the popular DE-9 connector.
Signal | Origin | DB-25
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 smaller connectors used on computer systems....

 pin
Name | Typical purpose Abbreviation DTE DCE
Data Terminal Ready
Data Terminal Ready
Data Terminal Ready, abbreviated as DTR, is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem...

 
Indicates presence of DTE to DCE. DTR 20
Data Carrier Detect
Data Carrier Detect
Data Carrier Detect, abbreviated as DCD, or alternately Carrier Detect abbreviated as CD, is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem. This signal is a simple "high/low" status bit that is sent "from DCE...

 
DCE is connected to the telephone line. DCD 8
Data Set Ready DCE is ready to receive commands or data. DSR 6
Ring Indicator
Ring Indicator
Ring Indicator, abbreviated as RI, is a control signal that is used in RS-232 serial communications cables between a computer and a modem. The signal is sent from the modem to the computer, typically over pin 9 of a nine-pin serial port, or pin 22 of a 25-pin serial port...

 
DCE has detected an incoming ring signal on the telephone line. RI 22
Request To Send DTE requests the DCE prepare to receive data. RTS 4
Clear To Send Indicates DCE is ready to accept data. CTS 5
Transmitted Data Carries data from DTE to DCE. TxD 2
Received Data Carries data from DCE to DTE. RxD 3
Common Ground GND common 7
Protective Ground PG common 1


The signals are named from the standpoint of the DTE. The ground signal is a common return
Single-ended signalling
Single-ended signaling is the simplest and most commonly used method of transmitting electrical signals over wires. One wire carries a varying voltage that represents the signal, while the other wire is connected to a reference voltage, usually ground....

 for the other connections. The DB-25 connector includes a second "protective ground" on pin 1.

Data can be sent over a secondary channel (when implemented by the DTE and DCE devices), which is equivalent to the primary channel. Pin assignments are described in following table:
Signal Pin
Common Ground 7 (same as primary)
Secondary Transmitted Data (STD) 14
Secondary Received Data (SRD) 16
Secondary Request To Send (SRTS) 19
Secondary Clear To Send (SCTS) 13
Secondary Carrier Detect (SDCD) 12

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 50 feet (15 metres) long will have too much capacitance, unless special cables are used. By using low-capacitance cables, full speed communication can be maintained over larger distances up to about 1,000 feet. For longer distances, other signal standards are better suited to maintain high speed.

Since the standard definitions are not always correctly applied, it is often necessary to consult documentation, test connections with a breakout box
Breakout box
A breakout box is an electrical device, usually housed in a box, in which a compound electrical connector is separated or "broken out" into its component connectors. Compound connectors are used where sufficient space for connections is unavailable...

, 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 changer
Gender changer
A gender changer is a hardware device placed between two cable connectors of the same type and gender.An example is a cable connector shell with either two female or two male connectors on it , used to correct the mismatches that result when interconnecting two devices or cables with the same...

s" 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 above. 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 between data and control lines (such as Ring Indicator
Ring Indicator
Ring Indicator, abbreviated as RI, is a control signal that is used in RS-232 serial communications cables between a computer and a modem. The signal is sent from the modem to the computer, typically over pin 9 of a nine-pin serial port, or pin 22 of a 25-pin serial port...

). If a given cable will not allow a data connection, especially if a Gender changer
Gender changer
A gender changer is a hardware device placed between two cable connectors of the same type and gender.An example is a cable connector shell with either two female or two male connectors on it , used to correct the mismatches that result when interconnecting two devices or cables with the same...

 is in use, a Null modem
Null modem
Null modem is a communication method to connect two DTEs directly using an RS-232 serial cable. The name stems from the historical use of the RS-232 cable to connect two teleprinter devices to modems in order to communicate with one another; null modem communication was possible by instead using...

 may be necessary.

Conventions

For functional communication through a serial port interface, conventions of bit rate, character framing, communications protocol, character encoding, data compression, and error detection, not defined in RS 232, must be agreed to by both sending and receiving equipment. For example, consider the serial port
Serial port
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...

s of the original IBM PC
IBM PC
The IBM Personal Computer, commonly known as the IBM PC, is the original version and progenitor of the IBM PC compatible hardware platform. It is IBM model number 5150, and was introduced on August 12, 1981...

. This implementation used an 8250 UART using asynchronous start-stop
Asynchronous start-stop
Asynchronous serial communication describes an asynchronous, serial transmission protocol in which a start signal is sent prior to each byte, character or code word and a stop signal is sent after each code word...

 character formatting with 7 or 8 data bits per frame, usually ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 character coding, and data rates programmable between 75 bits per second and 115,200 bits per second. Data rates above 20,000 bits per second are out of the scope of the standard, although higher data rates are sometimes used by commercially manufactured equipment. Since most RS-232 devices do not have automatic baud rate detection
Automatic baud rate detection
Automatic baud rate detection refers to the process by which a receiving device determines the speed, code level, and stop bits of incoming data by examining the first character, usually a preselected sign-on character...

, users must manually set the baud rate (and all other parameters) at both ends of the RS-232 connection.

In the particular case of the IBM PC, as with most UART chips including the 8250 UART used by the IBM PC, baud rates were programmable with arbitrary values. This allowed a PC to be connected to devices not using the rates typically used with modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...

s. Not all baud rates can be programmed, due to the clock frequency of the 8250 UART in the PC, and the granularity of the baud rate setting. This includes the baud rate of MIDI, 31,250 bits per second, which is generally not achievable by a standard IBM PC serial port. MIDI-to-RS-232 interfaces designed for the IBM PC include baud rate translation hardware to adjust the baud rate of the MIDI data to something that the IBM PC can support, for example 19,200 or 38,400 bits per second.

RTS/CTS handshaking

In older versions of the specification, RS-232's use of the RTS and CTS lines is asymmetric: The DTE asserts RTS to indicate a desire to transmit to the DCE, and the DCE asserts CTS in response to grant permission. This allows for half-duplex modems that disable their transmitters when not required, and must transmit a synchronization preamble to the receiver when they are re-enabled. This scheme is also employed on present-day RS-232 to RS-485 converters, where the RS-232's RTS signal is used to ask the converter to take control of the RS-485 bus - a concept that doesn't otherwise exist in RS-232. There is no way for the DTE to indicate that it is unable to accept data from the DCE.

A non-standard symmetric alternative, commonly called "RTS/CTS handshaking," was developed by various equipment manufacturers. In this scheme, CTS is no longer a response to RTS; instead, CTS indicates permission from the DCE for the DTE to send data to the DCE, and RTS indicates permission from the DTE for the DCE to send data to the DTE. RTS and CTS are controlled by the DTE and DCE respectively, each independent of the other. This 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 ON at all times.

Thus, with this alternative usage, one can think of RTS asserted (positive voltage, logic 0) meaning that the DTE is indicating it is "ready to receive" from the DCE, rather than requesting permission from the DCE to send characters to the DCE.

Note that equipment using this protocol must be prepared to buffer some extra data, since a transmission may have begun just before the control line state change.

RTS/CTS handshaking is an example of hardware flow control.
However, "hardware flow control" in the description of the options available on an RS-232-equipped device does not always mean RTS/CTS handshaking.

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 the 25-pin connectors and cables, and of course both the DTE and DCE must support them.

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
Loopback describes ways of routing electronic signals, digital data streams, or flows of items from their originating facility back to the source without intentional processing or modification...

 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 DCE's. When the DCE is in test mode it signals the DTE by setting pin 25 to ON.

A commonly used version of loopback testing doesn't 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
Loopback describes ways of routing electronic signals, digital data streams, or flows of items from their originating facility back to the source without intentional processing or modification...

).

Loopback testing is often performed with a specialized DTE called a bit error rate tester (or BERT).

Timing signals

Some synchronous devices provide a clock signal
Clock signal
In electronics and especially synchronous digital circuits, a clock signal is a particular type of signal that oscillates between a high and a low state and is utilized like a metronome to coordinate actions of circuits...

 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
Synchronous Data Link Control
Synchronous Data Link Control is a computer communications protocol. It is the layer 2 protocol for IBM's Systems Network Architecture . SDLC supports multipoint links as well as error correction. It also runs under the assumption that an SNA header is present after the SDLC header...

, HDLC, and X.25
X.25
X.25 is an ITU-T standard protocol suite for packet switched wide area network communication. An X.25 WAN consists of packet-switching exchange nodes as the networking hardware, and leased lines, Plain old telephone service connections or ISDN connections as physical links...

.

Secondary channel

There is a secondary data channel, identical in capability to the first. Five signals (plus the common ground of the primary channel) comprise the secondary channel: Secondary Transmitted Data (STD), Secondary Received Data (SRD), Secondary Request To Send (SRTS), Secondary Clear To Send (SCTS), and Secondary Carrier Detect (SDCD).

Related standards

Other serial signaling standards may not interoperate with standard-compliant RS-232 ports. For example, using the TTL levels of near +5 and 0 V puts the mark level in the undefined area of the standard. Such levels are sometimes used with NMEA 0183-compliant GPS
Global Positioning System
The Global Positioning System is a space-based global navigation satellite system that provides location and time information in all weather, anywhere on or near the Earth, where there is an unobstructed line of sight to four or more GPS satellites...

 receivers and depth finders
Fishfinder
A fishfinder is an instrument used to locate fish underwater by detecting reflected pulses of sound energy, as in SONAR. A modern fishfinder displays measurements of reflected sound on a graphical display, allowing an operator to interpret information to locate schools of fish, underwater debris,...

.

A 20 mA current loop
Current loop
A current loop describes two different electrical signalling schemes.- Digital :For digital serial communications, a current loop is a communication interface that uses current instead of voltage for signaling...

 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
Optical isolator
An optical isolator, or optical diode, is an optical component which allows the transmission of light in only one direction. It is typically used to prevent unwanted feedback into an optical oscillator, such as a laser cavity...

 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 withstand voltage limits of a compliant device. The original IBM PC serial port
Serial port
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...

 card implemented a 20 mA current-loop interface, which was never emulated by other suppliers of plug-compatible
Plug-compatible
A plug-compatible machine is one that has been designed to be backwards compatible with a prior machine. In particular, a new computer system that is plug-compatible has not only the same connectors and protocol interfaces to peripherals, but also runs the same CPU software as the old system...

 equipment.

Other serial interfaces similar to RS-232:
  • RS-422 (a high-speed system similar to RS-232 but with differential signaling
    Differential signaling
    Differential signaling is a method of transmitting information electrically by means of two complementary signals sent on two separate wires. The technique can be used for both analog signaling, as in some audio systems, and digital signaling, as in RS-422, RS-485, Ethernet , PCI Express and USB...

    )
  • RS-423
    RS-423
    RS/EIA/TIA-423 is a standard for serial communications. It defines an unbalanced interface , with a single, unidirectional sending driver, and allows for up to 10 receivers . It is normally implemented in integrated circuit technology and can also be employed for the interchange of serial binary...

     (a high-speed system similar to RS-422 but with unbalanced signaling
    Unbalanced line
    In Electrical engineering, an unbalanced line is a transmission line, usually coaxial cable, whose conductors have unequal impedances with respect to ground; as opposed to a balanced line.Microstrip and single-wire lines are also unbalanced lines....

    )
  • RS-449
    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 and data communications equipment....

     (a functional and mechanical interface that used RS-422 and RS-423 signals - it never caught on like RS-232 and was withdrawn by the EIA)
  • RS-485 (a descendant of RS-422 that can be used as a bus in multidrop configurations)
  • MIL-STD-188
    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 application of telecommunication standards and to the lack of a...

     (a system like RS-232 but with better impedance and rise time control)
  • EIA-530
    EIA-530
    Currently known asTIA-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....

     (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 8 Position Non-Synchronous Interface Between Data Terminal Equipment and Data Circuit Terminating Equipment Employing Serial Binary Data Interchange
  • EIA/TIA-562 Electrical Characteristics for an Unbalanced Digital Interface (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)
  • SpaceWire
    SpaceWire
    SpaceWire is a spacecraft communication network based in part on the IEEE 1355 standard of communications. It is coordinated by the European Space Agency in collaboration with international space agencies including NASA, JAXA and RKA...

     (high-speed serial system designed for use on board spacecraft
    Spacecraft
    A spacecraft or spaceship is a craft or machine designed for spaceflight. Spacecraft are used for a variety of purposes, including communications, earth observation, meteorology, navigation, planetary exploration and transportation of humans and cargo....

    ).

Development tools

When developing or troubleshooting systems using RS-232, close examination of hardware signals can be important to find problems. A serial line analyzer is a device similar to a logic analyzer
Logic analyzer
A logic analyzer is an electronic instrument which displays signals in a digital circuit. A logic analyzer may convert the captured data into timing diagrams, protocol decodes, state machine traces, assembly language, or correlate assembly with source-level software.Presently, there are three...

 but specialized for RS-232's voltage levels, connectors, and, where used, clock signals. The serial line analyzer can collect, store, and display 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
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 or other common codes and to interpret common protocols used over RS-232 such as SDLC
Synchronous Data Link Control
Synchronous Data Link Control is a computer communications protocol. It is the layer 2 protocol for IBM's Systems Network Architecture . SDLC supports multipoint links as well as error correction. It also runs under the assumption that an SNA header is present after the SDLC header...

, HDLC, DDCMP, and X.25
X.25
X.25 is an ITU-T standard protocol suite for packet switched wide area network communication. An X.25 WAN consists of packet-switching exchange nodes as the networking hardware, and leased lines, Plain old telephone service connections or ISDN connections as physical links...

. Serial line analyzers are available as standalone units, as software and interface cables for general-purpose logic analyzers, and as programs that run in common personal computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

s.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK