Jump to content

Edit filter log

Details for log entry 9002659

13:57, 13 July 2013: 41.58.138.154 (talk) triggered filter 344, performing the action "edit" on RS-232. Actions taken: Warn; Filter description: Prevent full page blanking (examine)

Changes made in edit

{{About|the RS-232 standard|RS-232 variants|serial port}}
[[File:DB25 Diagram.svg|thumb|A [[D-subminiature|DB]]-25 connector as described in the RS-232 standard]]

In [[telecommunications]], '''RS-232''' is the traditional name for a series of standards for [[serial communication|serial]] binary [[Single-ended signaling|single-ended]] [[data transmission|data]] and [[signaling (telecommunications)|control]] signals connecting between <span title="Usually a controlling terminal or a computer">''DTE''</span> (''[[data terminal equipment]]'') and <span title="Usually a modem or target device">''DCE''</span> (''[[data circuit-terminating equipment]]'', originally defined as ''data communication equipment''<ref name="eia"/>). It is commonly used in [[computer]] [[serial port]]s. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and [[pinout]] 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 '''[[serial port]]''' was once a standard feature of a [[personal computer]], used for connections to [[modem]]s, [[Printer (computing)|printers]], [[Mouse (computing)|mice]], data storage, [[uninterruptible power supplies]], and other peripheral devices. However, the low transmission speed, 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 either an external USB-to-RS-232 converter or an internal expansion card with one or more serial ports to connect to RS-232 peripherals. RS-232 devices are still found, especially in industrial machines, networking equipment, and scientific instruments.

==Scope of the standard==
The [[Electronic Industries Alliance|Electronic Industries Association]] (EIA) standard RS-232-C<ref name="eia">{{cite book|title=EIA standard RS-232-C: Interface between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange |year=1969|publisher=Electronic Industries Association. Engineering Dept|location=Washington|oclc=38637094}}</ref> as of 1969 defines:
* Electrical signal characteristics such as voltage levels, [[data signaling rate|signaling rate]], timing and [[slew rate|slew-rate]] of signals, voltage withstand level, [[Short circuit|short-circuit]] behavior, and maximum load [[capacitance]].
* 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]] or the framing of characters, or error detection protocols. Details of character format and transmission bit rate are controlled by the serial port hardware, often a single [[integrated circuit]] called a [[UART]] that converts data from parallel to [[asynchronous start-stop]] serial form. Details of voltage levels, slew rate, and short-circuit behavior are typically controlled by a [[line driver]] that converts from the UART's [[logic level]]s to RS-232 compatible signal levels, and a receiver that converts RS-232 compatible signal levels to the UART's logic levels. The standard does not define bit rates for transmission, except that it says it is intended for [[bit rate]]s lower than 20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above.

==History==
RS-232 was first introduced in 1962 by the ''Radio Sector'' of the [[Electronic Industries Alliance|EIA]].<ref>{{cite web|title=RS232 Tutorial on Data Interface and cables|url=http://www.arcelect.com/rs232.htm|publisher=ARC Electronics|accessdate=28 July 2011|year=2010}}</ref><ref>[http://www.landisgyr.eu/en/pub/services_support/metering_glossary.cfm?eventGlossary=glossary.Search&initial=E Metering Glossary] Landis + Gyr Tutorial (see ''EIA'')</ref> The original DTEs were electromechanical [[teleprinter|teletypewriters]], and the original DCEs were (usually) modems. When [[Computer terminal|electronic terminals]] (smart and dumb) began to be used, they were often designed to be interchangeable with teletypewriters, 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.{{Citation needed|date=January 2013}}

Since the requirements of devices such as computers, printers, test instruments, [[POS terminal]]s and so on were 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&nbsp;V and -5&nbsp;V and labeled them as "RS-232 compatible".{{Citation needed|date=April 2011}}

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]]s, such as modem 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 [[Programmable logic controller|PLC]]s), [[System console|console]] 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 Alliance]] and since 1988 by the [[Telecommunications Industry Association]] (TIA).<ref>{{cite web|title=TIA Facts at a Glance|url=http://www.tiaonline.org/about/|work=About TIA|publisher=Telecommunications Industry Association|accessdate=28 July 2011}}</ref> 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 [[ITU-T|CCITT]] standard V.24, but equipment built to the current standard will interoperate with older versions.{{Citation needed|date=April 2011}}

Related [[ITU-T]] standards include V.24 (circuit identification) and V.28 (signal voltage and timing characteristics).{{Citation needed|date=April 2011}}

In revison 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.<ref> S. Mackay, E. Wright, D. Reynders, J. Park, ''Practical Industrial Data Networks:Design, Installation and Troubleshooting'', Newnes, 2004 ISBN 07506 5807X, pages 41-42</ref>

==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:<ref>{{cite book|last=Horowitz|first=Paul|authorlink=Paul Horowitz|title=[[The Art of Electronics]]|year=1989|publisher=Cambridge University Press|location=Cambridge, England|edition=2nd|coauthors=and [[Winfield Hill]]|isbn=0-521-37095-7|pages=723–726}}</ref>
* 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]] 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 (data)|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 [[Mouse (computing)|mice]].
* The 25-way connector recommended in the standard is large compared to current practice.

==Role in modern personal computers==
[[Image:RS232 PCI-E.jpg|thumb|160px|right|[[PCI Express]] x1 card with one RS-232 port]]
{{main|Serial port}}
In the book ''[[PC 97]] Hardware Design Guide'',<ref name="pc 97">{{cite book|title=PC 97 Hardware Design Guide|year=1997|publisher=Microsoft Press|location=Redmond, Wash|isbn=1-57231-381-1}}</ref> [[Microsoft]] 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 Emulator|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]]s or lamps, since the control lines of the interface can be easily manipulated by software. This is not feasible with USB, which requires some form of receiver to decode the serial data.

As an alternative, USB [[docking port]]s are available which can provide connectors for a keyboard, mouse, one or more serial ports, and one or more [[parallel 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 supply|uninterruptible power supplies]]. 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 [[Programmable logic controller|PLCs]], [[Variable-frequency drive|VFDs]], [[servo drive]]s, and [[Numerical control|CNC equipment]] are programmable via RS-232. Some manufacturers have responded to this demand: Toshiba re-introduced the [[D-subminiature|DE-9M]] connector on the [[Toshiba Tecra|Tecra]] laptop.

Serial ports with RS-232 are also commonly used to communicate to [[headless system]]s such as [[server (computing)|servers]], where no monitor or keyboard is installed, during boot when [[operating system]] is not running yet and therefore no network connection is possible. An RS-232 serial port can communicate to some [[embedded system]]s such as [[Router (computing)|routers]] as an alternative to network mode of monitoring.

==Standard details==
In RS-232, user data is sent as a [[time-series]] of [[bit]]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===
[[Image:Rs232 oscilloscope trace.svg|thumb|160px|right| Diagrammatic oscilloscope trace of voltage levels for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit. This is typical for start-stop communications, but the standard does not dictate a character format or bit order.]]

[[File:RS232-UART Oscilloscope Screenshot.png|thumb|Upper picture: RS-232 data line on the terminals of the receiver side (RxD) probed by an oscilloscope (for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit and no parity bits). Lower picture: Same signal after going through a RS-232 level shifter; note the reversed signal logic and the TTL- or CMOS-compatible voltage levels ready to be fed into an UART (RIN).]]

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 ground/common 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 defined as a negative voltage, the signal condition is called "mark". Logic zero is positive and the signal condition is termed "space". Control signals have the opposite polarity: the asserted or active state is positive voltage and the deasserted or inactive state is negative voltage. Examples of control lines include request to send (RTS), clear to send (CTS), [[data terminal ready]] (DTR), and data set ready (DSR).

The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5&nbsp;V, ±10&nbsp;V, ±12&nbsp;V, and ±15&nbsp;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&nbsp;volt supply. 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]], 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 (electricity)|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 USB, [[RS-422]] and [[RS-485]] can tolerate larger ground voltage differences because of the differential signaling.<ref>{{cite web|last=Wilson|first=Michael R.|title=TIA/EIA-422-B Overview|url=http://www.national.com/an/AN/AN-1031.pdf|work=Application Note 1031|publisher=National Semiconductor|accessdate=28 July 2011|month=January|year=2000}}</ref>

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, for example with a pullup resistor. Some devices provide test voltages on their interface connectors for this purpose.

===Connectors===<!-- This section is linked from [[Data terminal equipment]] -->
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]] 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 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 specifies 20 different signal connections. Since most devices use only a few signals, smaller connectors can often be used.

For PC technology leading manufacturers started early to replace the once common DB-25M connector by the more compact and thus somewhat cheaper DE-9M connector for their devices. As the pin assignments needed to be condensed a noticeably different pin order was selected for that mechanical variant (for this see [[Serial_port#Pinouts|serial port]]). This type of connector became the de-facto standard for PCs and as well for many other DTE 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]] 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.

===Signals ===

The following table lists commonly used RS-232 signals and pin assignments.<ref>{{cite web |url=http://www.hardwarebook.info/Serial_(PC_9) |title=Serial (PC 9)|work=Hardware Book|author=Ögren, Joakim|date=18 September 2008|accessdate=28 July 2011}}</ref> See [[Serial_port#Pinouts|serial port (pinouts)]] for non-standard variations including the popular [[DE-9]] connector.

{| class="wikitable" style="margin:auto; text-align:center;"
! colspan="3" | Signal !! colspan="2" | Origin !! rowspan="2" | [[D-subminiature|DB-25]] pin
|-
! Name !! width="400px" | Typical purpose !! Abbreviation !! DTE !! DCE
|-
| align="left" | [[Data Terminal Ready]] || align="left" | Indicates presence of DTE to DCE. || DTR || ● || || 20
|-
| align="left" | [[Data Carrier Detect]] || align="left" | DCE is connected to the telephone line. || DCD || || ● || 8
|-
| align="left" | Data Set Ready || align="left" | DCE is ready to receive commands or data. || DSR || || ● || 6
|-
| align="left" | Ring Indicator || align="left" | DCE has detected an incoming ring signal on the telephone line. || RI || || ● || 22
|-
| align="left" | Request To Send || align="left" | DTE requests the DCE prepare to receive data. || RTS || ● || || 4
|-
| align="left" | Clear To Send || align="left" | Indicates DCE is ready to accept data. || CTS || || ● || 5
|-
| align="left" | Transmitted Data || align="left" | Carries data from DTE to DCE. || TxD || ● || || 2
|-
| align="left" | Received Data || align="left" | Carries data from DCE to DTE. || RxD || || ● || 3
|-
| align="left" | Common Ground || || GND || colspan="2" | <small>common</small>|| 7
|-
| align="left" | Protective Ground || || PG || colspan="2" | <small>common</small>|| 1
|}

The signals are named from the standpoint of the DTE. [[Single-ended signalling|The ground signal is a common return]] 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:
{| class="wikitable" style="margin:auto;"
! 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
|}





''Ring Indicator''' (RI), is a signal sent from the modem to the terminal device. It indicates to the terminal device that the phone line is ringing. In many computer serial ports, a [[hardware interrupt]] 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 is a one-way signal from the modem to the terminal (or more generally, the DCE to the DTE) that 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]] patterns.

The Ring Indicator signal is used by some older [[uninterruptible power supply|uninterruptible power supplies]] (UPS's) to signal a power failure state to the computer.

Certain personal computers can be configured for [[wake-on-ring]], allowing a computer that is suspended to answer a phone call.

===Cables===
{{main|Serial cable}}

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 {{convert|50|ft}} 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 {{convert|1,000|ft}}.<ref>{{cite web |url = http://aplawrence.com/Unixart/serial.art.html |title = Serial Wiring|year=1992|work=A. P. Lawrence |author =Lawrence, Tony|accessdate=28 July 2011}}</ref> 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]], 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]]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]]). If a given cable will not allow a data connection, especially if a [[Gender changer]] is in use, a [[Null modem]] 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 ports of the original [[IBM PC]]. This implementation used an [[8250 UART]] using [[asynchronous start-stop]] character formatting with 7 or 8 data bits per frame, usually [[ASCII]] 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]], 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 modems. 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.<ref>''InfoWorld'' 30 Mar 1992 page 80</ref> 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===
{{Further2|[[flow control (data)#Hardware flow control|Flow control (data)]]}}
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 does not 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.<ref>{{cite newsgroup
| title = Re: EIA-232 full duplex RTS/CTS flow control standard proposal
| author = [email protected] (Casey Leedom)
| date = 1990-02-20
| newsgroup = comp.dcom.modems
| url = http://groups.google.com/group/comp.dcom.modems/msg/39042605325cc765?dmode=source
| accessdate = 2008-04-30}}</ref>

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 [[Flow control (data)#Hardware flow control|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 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]] 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 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 testing is often performed with a specialized DTE called a [[bit error rate test]]er (or BERT).

===Timing signals===
Some synchronous devices provide a [[clock signal]] 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 [[Synchronous Data Link Control|SDLC]], [[HDLC]], and [[X.25]].

===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 [[Digital signal#Logic voltage levels|TTL]] levels of near +5 and 0&nbsp;V puts the mark level in the undefined area of the standard. Such levels are sometimes used with {{nowrap|[[NMEA 0183]]-compliant}} [[Global Positioning System|GPS]] receivers and [[fishfinder|depth finders]].

A 20&nbsp;mA [[current loop]] uses the absence of 20&nbsp;mA current for high, and the presence of current in the loop for low; this signaling method is often used for long-distance and [[optical isolator|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 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]] (a high-speed system similar to RS-232 but with [[differential signaling]])
*[[RS-423]] (a high-speed system similar to RS-422 but with [[Unbalanced line|unbalanced signaling]])
*[[RS-449]] (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]] (a system like RS-232 but with better impedance and rise time control)
*[[EIA-530]] (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)

==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]] 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]] or other common codes and to interpret common protocols used over RS-232 such as [[Synchronous Data Link Control|SDLC]], [[HDLC]], [[DDCMP]], and [[X.25]]. 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 computers.

==References==
{{Commons category|RS-232}}
{{Wikibooks|Serial Programming:RS-232 Connections}}
{{reflist}}

{{DEFAULTSORT:Rs-232}}
[[Category:Telecommunications equipment]]
[[Category:Computer hardware standards]]
[[Category:Networking standards]]

Action parameters

VariableValue
Edit count of the user (user_editcount)
null
Name of the user account (user_name)
'41.58.138.154'
Age of the user account (user_age)
0
Groups (including implicit) the user is in (user_groups)
[ 0 => '*' ]
Page ID (page_id)
26023
Page namespace (page_namespace)
0
Page title without namespace (page_title)
'RS-232'
Full page title (page_prefixedtitle)
'RS-232'
Last ten users to contribute to the page (page_recent_contributors)
[ 0 => 'Matthiaspaul', 1 => 'Anomalocaris', 2 => 'Webclient101', 3 => '192.232.130.224', 4 => 'Andy Dingley', 5 => 'CombatWombat42', 6 => '69.17.154.74', 7 => 'Jengelh', 8 => 'Jesse Viviano', 9 => 'Rchandra' ]
Action (action)
'edit'
Edit summary/reason (summary)
''
Whether or not the edit is marked as minor (no longer in use) (minor_edit)
false
Old page wikitext, before the edit (old_wikitext)
'{{About|the RS-232 standard|RS-232 variants|serial port}} [[File:DB25 Diagram.svg|thumb|A [[D-subminiature|DB]]-25 connector as described in the RS-232 standard]] In [[telecommunications]], '''RS-232''' is the traditional name for a series of standards for [[serial communication|serial]] binary [[Single-ended signaling|single-ended]] [[data transmission|data]] and [[signaling (telecommunications)|control]] signals connecting between <span title="Usually a controlling terminal or a computer">''DTE''</span> (''[[data terminal equipment]]'') and <span title="Usually a modem or target device">''DCE''</span> (''[[data circuit-terminating equipment]]'', originally defined as ''data communication equipment''<ref name="eia"/>). It is commonly used in [[computer]] [[serial port]]s. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and [[pinout]] 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 '''[[serial port]]''' was once a standard feature of a [[personal computer]], used for connections to [[modem]]s, [[Printer (computing)|printers]], [[Mouse (computing)|mice]], data storage, [[uninterruptible power supplies]], and other peripheral devices. However, the low transmission speed, 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 either an external USB-to-RS-232 converter or an internal expansion card with one or more serial ports to connect to RS-232 peripherals. RS-232 devices are still found, especially in industrial machines, networking equipment, and scientific instruments. ==Scope of the standard== The [[Electronic Industries Alliance|Electronic Industries Association]] (EIA) standard RS-232-C<ref name="eia">{{cite book|title=EIA standard RS-232-C: Interface between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange |year=1969|publisher=Electronic Industries Association. Engineering Dept|location=Washington|oclc=38637094}}</ref> as of 1969 defines: * Electrical signal characteristics such as voltage levels, [[data signaling rate|signaling rate]], timing and [[slew rate|slew-rate]] of signals, voltage withstand level, [[Short circuit|short-circuit]] behavior, and maximum load [[capacitance]]. * 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]] or the framing of characters, or error detection protocols. Details of character format and transmission bit rate are controlled by the serial port hardware, often a single [[integrated circuit]] called a [[UART]] that converts data from parallel to [[asynchronous start-stop]] serial form. Details of voltage levels, slew rate, and short-circuit behavior are typically controlled by a [[line driver]] that converts from the UART's [[logic level]]s to RS-232 compatible signal levels, and a receiver that converts RS-232 compatible signal levels to the UART's logic levels. The standard does not define bit rates for transmission, except that it says it is intended for [[bit rate]]s lower than 20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above. ==History== RS-232 was first introduced in 1962 by the ''Radio Sector'' of the [[Electronic Industries Alliance|EIA]].<ref>{{cite web|title=RS232 Tutorial on Data Interface and cables|url=http://www.arcelect.com/rs232.htm|publisher=ARC Electronics|accessdate=28 July 2011|year=2010}}</ref><ref>[http://www.landisgyr.eu/en/pub/services_support/metering_glossary.cfm?eventGlossary=glossary.Search&initial=E Metering Glossary] Landis + Gyr Tutorial (see ''EIA'')</ref> The original DTEs were electromechanical [[teleprinter|teletypewriters]], and the original DCEs were (usually) modems. When [[Computer terminal|electronic terminals]] (smart and dumb) began to be used, they were often designed to be interchangeable with teletypewriters, 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.{{Citation needed|date=January 2013}} Since the requirements of devices such as computers, printers, test instruments, [[POS terminal]]s and so on were 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&nbsp;V and -5&nbsp;V and labeled them as "RS-232 compatible".{{Citation needed|date=April 2011}} 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]]s, such as modem 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 [[Programmable logic controller|PLC]]s), [[System console|console]] 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 Alliance]] and since 1988 by the [[Telecommunications Industry Association]] (TIA).<ref>{{cite web|title=TIA Facts at a Glance|url=http://www.tiaonline.org/about/|work=About TIA|publisher=Telecommunications Industry Association|accessdate=28 July 2011}}</ref> 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 [[ITU-T|CCITT]] standard V.24, but equipment built to the current standard will interoperate with older versions.{{Citation needed|date=April 2011}} Related [[ITU-T]] standards include V.24 (circuit identification) and V.28 (signal voltage and timing characteristics).{{Citation needed|date=April 2011}} In revison 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.<ref> S. Mackay, E. Wright, D. Reynders, J. Park, ''Practical Industrial Data Networks:Design, Installation and Troubleshooting'', Newnes, 2004 ISBN 07506 5807X, pages 41-42</ref> ==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:<ref>{{cite book|last=Horowitz|first=Paul|authorlink=Paul Horowitz|title=[[The Art of Electronics]]|year=1989|publisher=Cambridge University Press|location=Cambridge, England|edition=2nd|coauthors=and [[Winfield Hill]]|isbn=0-521-37095-7|pages=723–726}}</ref> * 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]] 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 (data)|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 [[Mouse (computing)|mice]]. * The 25-way connector recommended in the standard is large compared to current practice. ==Role in modern personal computers== [[Image:RS232 PCI-E.jpg|thumb|160px|right|[[PCI Express]] x1 card with one RS-232 port]] {{main|Serial port}} In the book ''[[PC 97]] Hardware Design Guide'',<ref name="pc 97">{{cite book|title=PC 97 Hardware Design Guide|year=1997|publisher=Microsoft Press|location=Redmond, Wash|isbn=1-57231-381-1}}</ref> [[Microsoft]] 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 Emulator|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]]s or lamps, since the control lines of the interface can be easily manipulated by software. This is not feasible with USB, which requires some form of receiver to decode the serial data. As an alternative, USB [[docking port]]s are available which can provide connectors for a keyboard, mouse, one or more serial ports, and one or more [[parallel 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 supply|uninterruptible power supplies]]. 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 [[Programmable logic controller|PLCs]], [[Variable-frequency drive|VFDs]], [[servo drive]]s, and [[Numerical control|CNC equipment]] are programmable via RS-232. Some manufacturers have responded to this demand: Toshiba re-introduced the [[D-subminiature|DE-9M]] connector on the [[Toshiba Tecra|Tecra]] laptop. Serial ports with RS-232 are also commonly used to communicate to [[headless system]]s such as [[server (computing)|servers]], where no monitor or keyboard is installed, during boot when [[operating system]] is not running yet and therefore no network connection is possible. An RS-232 serial port can communicate to some [[embedded system]]s such as [[Router (computing)|routers]] as an alternative to network mode of monitoring. ==Standard details== In RS-232, user data is sent as a [[time-series]] of [[bit]]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=== [[Image:Rs232 oscilloscope trace.svg|thumb|160px|right| Diagrammatic oscilloscope trace of voltage levels for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit. This is typical for start-stop communications, but the standard does not dictate a character format or bit order.]] [[File:RS232-UART Oscilloscope Screenshot.png|thumb|Upper picture: RS-232 data line on the terminals of the receiver side (RxD) probed by an oscilloscope (for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit and no parity bits). Lower picture: Same signal after going through a RS-232 level shifter; note the reversed signal logic and the TTL- or CMOS-compatible voltage levels ready to be fed into an UART (RIN).]] 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 ground/common 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 defined as a negative voltage, the signal condition is called "mark". Logic zero is positive and the signal condition is termed "space". Control signals have the opposite polarity: the asserted or active state is positive voltage and the deasserted or inactive state is negative voltage. Examples of control lines include request to send (RTS), clear to send (CTS), [[data terminal ready]] (DTR), and data set ready (DSR). The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5&nbsp;V, ±10&nbsp;V, ±12&nbsp;V, and ±15&nbsp;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&nbsp;volt supply. 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]], 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 (electricity)|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 USB, [[RS-422]] and [[RS-485]] can tolerate larger ground voltage differences because of the differential signaling.<ref>{{cite web|last=Wilson|first=Michael R.|title=TIA/EIA-422-B Overview|url=http://www.national.com/an/AN/AN-1031.pdf|work=Application Note 1031|publisher=National Semiconductor|accessdate=28 July 2011|month=January|year=2000}}</ref> 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, for example with a pullup resistor. Some devices provide test voltages on their interface connectors for this purpose. ===Connectors===<!-- This section is linked from [[Data terminal equipment]] --> 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]] 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 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 specifies 20 different signal connections. Since most devices use only a few signals, smaller connectors can often be used. For PC technology leading manufacturers started early to replace the once common DB-25M connector by the more compact and thus somewhat cheaper DE-9M connector for their devices. As the pin assignments needed to be condensed a noticeably different pin order was selected for that mechanical variant (for this see [[Serial_port#Pinouts|serial port]]). This type of connector became the de-facto standard for PCs and as well for many other DTE 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]] 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. ===Signals === The following table lists commonly used RS-232 signals and pin assignments.<ref>{{cite web |url=http://www.hardwarebook.info/Serial_(PC_9) |title=Serial (PC 9)|work=Hardware Book|author=Ögren, Joakim|date=18 September 2008|accessdate=28 July 2011}}</ref> See [[Serial_port#Pinouts|serial port (pinouts)]] for non-standard variations including the popular [[DE-9]] connector. {| class="wikitable" style="margin:auto; text-align:center;" ! colspan="3" | Signal !! colspan="2" | Origin !! rowspan="2" | [[D-subminiature|DB-25]] pin |- ! Name !! width="400px" | Typical purpose !! Abbreviation !! DTE !! DCE |- | align="left" | [[Data Terminal Ready]] || align="left" | Indicates presence of DTE to DCE. || DTR || ● || || 20 |- | align="left" | [[Data Carrier Detect]] || align="left" | DCE is connected to the telephone line. || DCD || || ● || 8 |- | align="left" | Data Set Ready || align="left" | DCE is ready to receive commands or data. || DSR || || ● || 6 |- | align="left" | Ring Indicator || align="left" | DCE has detected an incoming ring signal on the telephone line. || RI || || ● || 22 |- | align="left" | Request To Send || align="left" | DTE requests the DCE prepare to receive data. || RTS || ● || || 4 |- | align="left" | Clear To Send || align="left" | Indicates DCE is ready to accept data. || CTS || || ● || 5 |- | align="left" | Transmitted Data || align="left" | Carries data from DTE to DCE. || TxD || ● || || 2 |- | align="left" | Received Data || align="left" | Carries data from DCE to DTE. || RxD || || ● || 3 |- | align="left" | Common Ground || || GND || colspan="2" | <small>common</small>|| 7 |- | align="left" | Protective Ground || || PG || colspan="2" | <small>common</small>|| 1 |} The signals are named from the standpoint of the DTE. [[Single-ended signalling|The ground signal is a common return]] 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: {| class="wikitable" style="margin:auto;" ! 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 |} ''Ring Indicator''' (RI), is a signal sent from the modem to the terminal device. It indicates to the terminal device that the phone line is ringing. In many computer serial ports, a [[hardware interrupt]] 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 is a one-way signal from the modem to the terminal (or more generally, the DCE to the DTE) that 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]] patterns. The Ring Indicator signal is used by some older [[uninterruptible power supply|uninterruptible power supplies]] (UPS's) to signal a power failure state to the computer. Certain personal computers can be configured for [[wake-on-ring]], allowing a computer that is suspended to answer a phone call. ===Cables=== {{main|Serial cable}} 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 {{convert|50|ft}} 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 {{convert|1,000|ft}}.<ref>{{cite web |url = http://aplawrence.com/Unixart/serial.art.html |title = Serial Wiring|year=1992|work=A. P. Lawrence |author =Lawrence, Tony|accessdate=28 July 2011}}</ref> 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]], 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]]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]]). If a given cable will not allow a data connection, especially if a [[Gender changer]] is in use, a [[Null modem]] 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 ports of the original [[IBM PC]]. This implementation used an [[8250 UART]] using [[asynchronous start-stop]] character formatting with 7 or 8 data bits per frame, usually [[ASCII]] 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]], 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 modems. 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.<ref>''InfoWorld'' 30 Mar 1992 page 80</ref> 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=== {{Further2|[[flow control (data)#Hardware flow control|Flow control (data)]]}} 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 does not 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.<ref>{{cite newsgroup | title = Re: EIA-232 full duplex RTS/CTS flow control standard proposal | author = [email protected] (Casey Leedom) | date = 1990-02-20 | newsgroup = comp.dcom.modems | id = <[email protected]> | url = http://groups.google.com/group/comp.dcom.modems/msg/39042605325cc765?dmode=source | accessdate = 2008-04-30}}</ref> 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 [[Flow control (data)#Hardware flow control|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 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]] 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 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 testing is often performed with a specialized DTE called a [[bit error rate test]]er (or BERT). ===Timing signals=== Some synchronous devices provide a [[clock signal]] 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 [[Synchronous Data Link Control|SDLC]], [[HDLC]], and [[X.25]]. ===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 [[Digital signal#Logic voltage levels|TTL]] levels of near +5 and 0&nbsp;V puts the mark level in the undefined area of the standard. Such levels are sometimes used with {{nowrap|[[NMEA 0183]]-compliant}} [[Global Positioning System|GPS]] receivers and [[fishfinder|depth finders]]. A 20&nbsp;mA [[current loop]] uses the absence of 20&nbsp;mA current for high, and the presence of current in the loop for low; this signaling method is often used for long-distance and [[optical isolator|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 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]] (a high-speed system similar to RS-232 but with [[differential signaling]]) *[[RS-423]] (a high-speed system similar to RS-422 but with [[Unbalanced line|unbalanced signaling]]) *[[RS-449]] (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]] (a system like RS-232 but with better impedance and rise time control) *[[EIA-530]] (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) ==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]] 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]] or other common codes and to interpret common protocols used over RS-232 such as [[Synchronous Data Link Control|SDLC]], [[HDLC]], [[DDCMP]], and [[X.25]]. 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 computers. ==References== {{Commons category|RS-232}} {{Wikibooks|Serial Programming:RS-232 Connections}} {{reflist}} {{DEFAULTSORT:Rs-232}} [[Category:Telecommunications equipment]] [[Category:Computer hardware standards]] [[Category:Networking standards]]'
New page wikitext, after the edit (new_wikitext)
''
Unified diff of changes made by edit (edit_diff)
'@@ -1,224 +1 @@ -{{About|the RS-232 standard|RS-232 variants|serial port}} -[[File:DB25 Diagram.svg|thumb|A [[D-subminiature|DB]]-25 connector as described in the RS-232 standard]] -In [[telecommunications]], '''RS-232''' is the traditional name for a series of standards for [[serial communication|serial]] binary [[Single-ended signaling|single-ended]] [[data transmission|data]] and [[signaling (telecommunications)|control]] signals connecting between <span title="Usually a controlling terminal or a computer">''DTE''</span> (''[[data terminal equipment]]'') and <span title="Usually a modem or target device">''DCE''</span> (''[[data circuit-terminating equipment]]'', originally defined as ''data communication equipment''<ref name="eia"/>). It is commonly used in [[computer]] [[serial port]]s. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and [[pinout]] 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 '''[[serial port]]''' was once a standard feature of a [[personal computer]], used for connections to [[modem]]s, [[Printer (computing)|printers]], [[Mouse (computing)|mice]], data storage, [[uninterruptible power supplies]], and other peripheral devices. However, the low transmission speed, 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 either an external USB-to-RS-232 converter or an internal expansion card with one or more serial ports to connect to RS-232 peripherals. RS-232 devices are still found, especially in industrial machines, networking equipment, and scientific instruments. - -==Scope of the standard== -The [[Electronic Industries Alliance|Electronic Industries Association]] (EIA) standard RS-232-C<ref name="eia">{{cite book|title=EIA standard RS-232-C: Interface between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange |year=1969|publisher=Electronic Industries Association. Engineering Dept|location=Washington|oclc=38637094}}</ref> as of 1969 defines: -* Electrical signal characteristics such as voltage levels, [[data signaling rate|signaling rate]], timing and [[slew rate|slew-rate]] of signals, voltage withstand level, [[Short circuit|short-circuit]] behavior, and maximum load [[capacitance]]. -* 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]] or the framing of characters, or error detection protocols. Details of character format and transmission bit rate are controlled by the serial port hardware, often a single [[integrated circuit]] called a [[UART]] that converts data from parallel to [[asynchronous start-stop]] serial form. Details of voltage levels, slew rate, and short-circuit behavior are typically controlled by a [[line driver]] that converts from the UART's [[logic level]]s to RS-232 compatible signal levels, and a receiver that converts RS-232 compatible signal levels to the UART's logic levels. The standard does not define bit rates for transmission, except that it says it is intended for [[bit rate]]s lower than 20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above. - -==History== -RS-232 was first introduced in 1962 by the ''Radio Sector'' of the [[Electronic Industries Alliance|EIA]].<ref>{{cite web|title=RS232 Tutorial on Data Interface and cables|url=http://www.arcelect.com/rs232.htm|publisher=ARC Electronics|accessdate=28 July 2011|year=2010}}</ref><ref>[http://www.landisgyr.eu/en/pub/services_support/metering_glossary.cfm?eventGlossary=glossary.Search&initial=E Metering Glossary] Landis + Gyr Tutorial (see ''EIA'')</ref> The original DTEs were electromechanical [[teleprinter|teletypewriters]], and the original DCEs were (usually) modems. When [[Computer terminal|electronic terminals]] (smart and dumb) began to be used, they were often designed to be interchangeable with teletypewriters, 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.{{Citation needed|date=January 2013}} - -Since the requirements of devices such as computers, printers, test instruments, [[POS terminal]]s and so on were 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&nbsp;V and -5&nbsp;V and labeled them as "RS-232 compatible".{{Citation needed|date=April 2011}} - -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]]s, such as modem 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 [[Programmable logic controller|PLC]]s), [[System console|console]] 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 Alliance]] and since 1988 by the [[Telecommunications Industry Association]] (TIA).<ref>{{cite web|title=TIA Facts at a Glance|url=http://www.tiaonline.org/about/|work=About TIA|publisher=Telecommunications Industry Association|accessdate=28 July 2011}}</ref> 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 [[ITU-T|CCITT]] standard V.24, but equipment built to the current standard will interoperate with older versions.{{Citation needed|date=April 2011}} - -Related [[ITU-T]] standards include V.24 (circuit identification) and V.28 (signal voltage and timing characteristics).{{Citation needed|date=April 2011}} - -In revison 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.<ref> S. Mackay, E. Wright, D. Reynders, J. Park, ''Practical Industrial Data Networks:Design, Installation and Troubleshooting'', Newnes, 2004 ISBN 07506 5807X, pages 41-42</ref> - -==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:<ref>{{cite book|last=Horowitz|first=Paul|authorlink=Paul Horowitz|title=[[The Art of Electronics]]|year=1989|publisher=Cambridge University Press|location=Cambridge, England|edition=2nd|coauthors=and [[Winfield Hill]]|isbn=0-521-37095-7|pages=723–726}}</ref> -* 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]] 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 (data)|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 [[Mouse (computing)|mice]]. -* The 25-way connector recommended in the standard is large compared to current practice. - -==Role in modern personal computers== -[[Image:RS232 PCI-E.jpg|thumb|160px|right|[[PCI Express]] x1 card with one RS-232 port]] -{{main|Serial port}} -In the book ''[[PC 97]] Hardware Design Guide'',<ref name="pc 97">{{cite book|title=PC 97 Hardware Design Guide|year=1997|publisher=Microsoft Press|location=Redmond, Wash|isbn=1-57231-381-1}}</ref> [[Microsoft]] 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 Emulator|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]]s or lamps, since the control lines of the interface can be easily manipulated by software. This is not feasible with USB, which requires some form of receiver to decode the serial data. - -As an alternative, USB [[docking port]]s are available which can provide connectors for a keyboard, mouse, one or more serial ports, and one or more [[parallel 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 supply|uninterruptible power supplies]]. 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 [[Programmable logic controller|PLCs]], [[Variable-frequency drive|VFDs]], [[servo drive]]s, and [[Numerical control|CNC equipment]] are programmable via RS-232. Some manufacturers have responded to this demand: Toshiba re-introduced the [[D-subminiature|DE-9M]] connector on the [[Toshiba Tecra|Tecra]] laptop. - -Serial ports with RS-232 are also commonly used to communicate to [[headless system]]s such as [[server (computing)|servers]], where no monitor or keyboard is installed, during boot when [[operating system]] is not running yet and therefore no network connection is possible. An RS-232 serial port can communicate to some [[embedded system]]s such as [[Router (computing)|routers]] as an alternative to network mode of monitoring. - -==Standard details== -In RS-232, user data is sent as a [[time-series]] of [[bit]]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=== -[[Image:Rs232 oscilloscope trace.svg|thumb|160px|right| Diagrammatic oscilloscope trace of voltage levels for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit. This is typical for start-stop communications, but the standard does not dictate a character format or bit order.]] - -[[File:RS232-UART Oscilloscope Screenshot.png|thumb|Upper picture: RS-232 data line on the terminals of the receiver side (RxD) probed by an oscilloscope (for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit and no parity bits). Lower picture: Same signal after going through a RS-232 level shifter; note the reversed signal logic and the TTL- or CMOS-compatible voltage levels ready to be fed into an UART (RIN).]] - -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 ground/common 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 defined as a negative voltage, the signal condition is called "mark". Logic zero is positive and the signal condition is termed "space". Control signals have the opposite polarity: the asserted or active state is positive voltage and the deasserted or inactive state is negative voltage. Examples of control lines include request to send (RTS), clear to send (CTS), [[data terminal ready]] (DTR), and data set ready (DSR). - -The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5&nbsp;V, ±10&nbsp;V, ±12&nbsp;V, and ±15&nbsp;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&nbsp;volt supply. 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]], 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 (electricity)|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 USB, [[RS-422]] and [[RS-485]] can tolerate larger ground voltage differences because of the differential signaling.<ref>{{cite web|last=Wilson|first=Michael R.|title=TIA/EIA-422-B Overview|url=http://www.national.com/an/AN/AN-1031.pdf|work=Application Note 1031|publisher=National Semiconductor|accessdate=28 July 2011|month=January|year=2000}}</ref> - -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, for example with a pullup resistor. Some devices provide test voltages on their interface connectors for this purpose. - -===Connectors===<!-- This section is linked from [[Data terminal equipment]] --> -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]] 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 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 specifies 20 different signal connections. Since most devices use only a few signals, smaller connectors can often be used. - -For PC technology leading manufacturers started early to replace the once common DB-25M connector by the more compact and thus somewhat cheaper DE-9M connector for their devices. As the pin assignments needed to be condensed a noticeably different pin order was selected for that mechanical variant (for this see [[Serial_port#Pinouts|serial port]]). This type of connector became the de-facto standard for PCs and as well for many other DTE 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]] 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. - -===Signals === - -The following table lists commonly used RS-232 signals and pin assignments.<ref>{{cite web |url=http://www.hardwarebook.info/Serial_(PC_9) |title=Serial (PC 9)|work=Hardware Book|author=Ögren, Joakim|date=18 September 2008|accessdate=28 July 2011}}</ref> See [[Serial_port#Pinouts|serial port (pinouts)]] for non-standard variations including the popular [[DE-9]] connector. - -{| class="wikitable" style="margin:auto; text-align:center;" -! colspan="3" | Signal !! colspan="2" | Origin !! rowspan="2" | [[D-subminiature|DB-25]] pin -|- -! Name !! width="400px" | Typical purpose !! Abbreviation !! DTE !! DCE -|- -| align="left" | [[Data Terminal Ready]] || align="left" | Indicates presence of DTE to DCE. || DTR || ● || || 20 -|- -| align="left" | [[Data Carrier Detect]] || align="left" | DCE is connected to the telephone line. || DCD || || ● || 8 -|- -| align="left" | Data Set Ready || align="left" | DCE is ready to receive commands or data. || DSR || || ● || 6 -|- -| align="left" | Ring Indicator || align="left" | DCE has detected an incoming ring signal on the telephone line. || RI || || ● || 22 -|- -| align="left" | Request To Send || align="left" | DTE requests the DCE prepare to receive data. || RTS || ● || || 4 -|- -| align="left" | Clear To Send || align="left" | Indicates DCE is ready to accept data. || CTS || || ● || 5 -|- -| align="left" | Transmitted Data || align="left" | Carries data from DTE to DCE. || TxD || ● || || 2 -|- -| align="left" | Received Data || align="left" | Carries data from DCE to DTE. || RxD || || ● || 3 -|- -| align="left" | Common Ground || || GND || colspan="2" | <small>common</small>|| 7 -|- -| align="left" | Protective Ground || || PG || colspan="2" | <small>common</small>|| 1 -|} - -The signals are named from the standpoint of the DTE. [[Single-ended signalling|The ground signal is a common return]] 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: -{| class="wikitable" style="margin:auto;" -! 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 -|} - - - - - -''Ring Indicator''' (RI), is a signal sent from the modem to the terminal device. It indicates to the terminal device that the phone line is ringing. In many computer serial ports, a [[hardware interrupt]] 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 is a one-way signal from the modem to the terminal (or more generally, the DCE to the DTE) that 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]] patterns. - -The Ring Indicator signal is used by some older [[uninterruptible power supply|uninterruptible power supplies]] (UPS's) to signal a power failure state to the computer. - -Certain personal computers can be configured for [[wake-on-ring]], allowing a computer that is suspended to answer a phone call. - -===Cables=== -{{main|Serial cable}} - -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 {{convert|50|ft}} 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 {{convert|1,000|ft}}.<ref>{{cite web |url = http://aplawrence.com/Unixart/serial.art.html |title = Serial Wiring|year=1992|work=A. P. Lawrence |author =Lawrence, Tony|accessdate=28 July 2011}}</ref> 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]], 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]]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]]). If a given cable will not allow a data connection, especially if a [[Gender changer]] is in use, a [[Null modem]] 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 ports of the original [[IBM PC]]. This implementation used an [[8250 UART]] using [[asynchronous start-stop]] character formatting with 7 or 8 data bits per frame, usually [[ASCII]] 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]], 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 modems. 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.<ref>''InfoWorld'' 30 Mar 1992 page 80</ref> 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=== -{{Further2|[[flow control (data)#Hardware flow control|Flow control (data)]]}} -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 does not 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.<ref>{{cite newsgroup - | title = Re: EIA-232 full duplex RTS/CTS flow control standard proposal - | author = [email protected] (Casey Leedom) - | date = 1990-02-20 - | newsgroup = comp.dcom.modems - | id = <[email protected]> - | url = http://groups.google.com/group/comp.dcom.modems/msg/39042605325cc765?dmode=source - | accessdate = 2008-04-30}}</ref> - -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 [[Flow control (data)#Hardware flow control|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 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]] 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 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 testing is often performed with a specialized DTE called a [[bit error rate test]]er (or BERT). - -===Timing signals=== -Some synchronous devices provide a [[clock signal]] 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 [[Synchronous Data Link Control|SDLC]], [[HDLC]], and [[X.25]]. - -===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 [[Digital signal#Logic voltage levels|TTL]] levels of near +5 and 0&nbsp;V puts the mark level in the undefined area of the standard. Such levels are sometimes used with {{nowrap|[[NMEA 0183]]-compliant}} [[Global Positioning System|GPS]] receivers and [[fishfinder|depth finders]]. - -A 20&nbsp;mA [[current loop]] uses the absence of 20&nbsp;mA current for high, and the presence of current in the loop for low; this signaling method is often used for long-distance and [[optical isolator|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 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]] (a high-speed system similar to RS-232 but with [[differential signaling]]) -*[[RS-423]] (a high-speed system similar to RS-422 but with [[Unbalanced line|unbalanced signaling]]) -*[[RS-449]] (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]] (a system like RS-232 but with better impedance and rise time control) -*[[EIA-530]] (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) - -==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]] 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]] or other common codes and to interpret common protocols used over RS-232 such as [[Synchronous Data Link Control|SDLC]], [[HDLC]], [[DDCMP]], and [[X.25]]. 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 computers. - -==References== -{{Commons category|RS-232}} -{{Wikibooks|Serial Programming:RS-232 Connections}} -{{reflist}} - -{{DEFAULTSORT:Rs-232}} -[[Category:Telecommunications equipment]] -[[Category:Computer hardware standards]] -[[Category:Networking standards]] '
New page size (new_size)
0
Old page size (old_size)
36958
Size change in edit (edit_delta)
-36958
Lines added in edit (added_lines)
[]
Lines removed in edit (removed_lines)
[ 0 => '{{About|the RS-232 standard|RS-232 variants|serial port}}', 1 => '[[File:DB25 Diagram.svg|thumb|A [[D-subminiature|DB]]-25 connector as described in the RS-232 standard]]', 2 => 'In [[telecommunications]], '''RS-232''' is the traditional name for a series of standards for [[serial communication|serial]] binary [[Single-ended signaling|single-ended]] [[data transmission|data]] and [[signaling (telecommunications)|control]] signals connecting between <span title="Usually a controlling terminal or a computer">''DTE''</span> (''[[data terminal equipment]]'') and <span title="Usually a modem or target device">''DCE''</span> (''[[data circuit-terminating equipment]]'', originally defined as ''data communication equipment''<ref name="eia"/>). It is commonly used in [[computer]] [[serial port]]s. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and [[pinout]] 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.', 3 => false, 4 => 'An RS-232 '''[[serial port]]''' was once a standard feature of a [[personal computer]], used for connections to [[modem]]s, [[Printer (computing)|printers]], [[Mouse (computing)|mice]], data storage, [[uninterruptible power supplies]], and other peripheral devices. However, the low transmission speed, 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 either an external USB-to-RS-232 converter or an internal expansion card with one or more serial ports to connect to RS-232 peripherals. RS-232 devices are still found, especially in industrial machines, networking equipment, and scientific instruments.', 5 => false, 6 => '==Scope of the standard==', 7 => 'The [[Electronic Industries Alliance|Electronic Industries Association]] (EIA) standard RS-232-C<ref name="eia">{{cite book|title=EIA standard RS-232-C: Interface between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange |year=1969|publisher=Electronic Industries Association. Engineering Dept|location=Washington|oclc=38637094}}</ref> as of 1969 defines:', 8 => '* Electrical signal characteristics such as voltage levels, [[data signaling rate|signaling rate]], timing and [[slew rate|slew-rate]] of signals, voltage withstand level, [[Short circuit|short-circuit]] behavior, and maximum load [[capacitance]].', 9 => '* Interface mechanical characteristics, pluggable connectors and pin identification.', 10 => '* Functions of each circuit in the interface connector.', 11 => '* Standard subsets of interface circuits for selected telecom applications.', 12 => false, 13 => 'The standard does not define such elements as the [[character encoding]] or the framing of characters, or error detection protocols. Details of character format and transmission bit rate are controlled by the serial port hardware, often a single [[integrated circuit]] called a [[UART]] that converts data from parallel to [[asynchronous start-stop]] serial form. Details of voltage levels, slew rate, and short-circuit behavior are typically controlled by a [[line driver]] that converts from the UART's [[logic level]]s to RS-232 compatible signal levels, and a receiver that converts RS-232 compatible signal levels to the UART's logic levels. The standard does not define bit rates for transmission, except that it says it is intended for [[bit rate]]s lower than 20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above.', 14 => false, 15 => '==History==', 16 => 'RS-232 was first introduced in 1962 by the ''Radio Sector'' of the [[Electronic Industries Alliance|EIA]].<ref>{{cite web|title=RS232 Tutorial on Data Interface and cables|url=http://www.arcelect.com/rs232.htm|publisher=ARC Electronics|accessdate=28 July 2011|year=2010}}</ref><ref>[http://www.landisgyr.eu/en/pub/services_support/metering_glossary.cfm?eventGlossary=glossary.Search&initial=E Metering Glossary] Landis + Gyr Tutorial (see ''EIA'')</ref> The original DTEs were electromechanical [[teleprinter|teletypewriters]], and the original DCEs were (usually) modems. When [[Computer terminal|electronic terminals]] (smart and dumb) began to be used, they were often designed to be interchangeable with teletypewriters, 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.{{Citation needed|date=January 2013}}', 17 => false, 18 => 'Since the requirements of devices such as computers, printers, test instruments, [[POS terminal]]s and so on were 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&nbsp;V and -5&nbsp;V and labeled them as "RS-232 compatible".{{Citation needed|date=April 2011}}', 19 => false, 20 => '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]]s, such as modem 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 [[Programmable logic controller|PLC]]s), [[System console|console]] ports and special purpose equipment.', 21 => false, 22 => '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]] and since 1988 by the [[Telecommunications Industry Association]] (TIA).<ref>{{cite web|title=TIA Facts at a Glance|url=http://www.tiaonline.org/about/|work=About TIA|publisher=Telecommunications Industry Association|accessdate=28 July 2011}}</ref> 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 [[ITU-T|CCITT]] standard V.24, but equipment built to the current standard will interoperate with older versions.{{Citation needed|date=April 2011}}', 23 => false, 24 => 'Related [[ITU-T]] standards include V.24 (circuit identification) and V.28 (signal voltage and timing characteristics).{{Citation needed|date=April 2011}}', 25 => false, 26 => 'In revison 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.<ref> S. Mackay, E. Wright, D. Reynders, J. Park, ''Practical Industrial Data Networks:Design, Installation and Troubleshooting'', Newnes, 2004 ISBN 07506 5807X, pages 41-42</ref>', 27 => false, 28 => '==Limitations of the standard==', 29 => '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:<ref>{{cite book|last=Horowitz|first=Paul|authorlink=Paul Horowitz|title=[[The Art of Electronics]]|year=1989|publisher=Cambridge University Press|location=Cambridge, England|edition=2nd|coauthors=and [[Winfield Hill]]|isbn=0-521-37095-7|pages=723–726}}</ref>', 30 => '* 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.', 31 => '* Single-ended signaling referred to a common signal ground limits the noise immunity and transmission distance.', 32 => '* 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.', 33 => '* 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.', 34 => '* The [[handshaking]] 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 (data)|flow control]] is not reliably implemented in many devices.', 35 => '* 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 [[Mouse (computing)|mice]].', 36 => '* The 25-way connector recommended in the standard is large compared to current practice.', 37 => false, 38 => '==Role in modern personal computers==', 39 => '[[Image:RS232 PCI-E.jpg|thumb|160px|right|[[PCI Express]] x1 card with one RS-232 port]]', 40 => '{{main|Serial port}}', 41 => 'In the book ''[[PC 97]] Hardware Design Guide'',<ref name="pc 97">{{cite book|title=PC 97 Hardware Design Guide|year=1997|publisher=Microsoft Press|location=Redmond, Wash|isbn=1-57231-381-1}}</ref> [[Microsoft]] 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 Emulator|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]]s or lamps, since the control lines of the interface can be easily manipulated by software. This is not feasible with USB, which requires some form of receiver to decode the serial data.', 42 => false, 43 => 'As an alternative, USB [[docking port]]s are available which can provide connectors for a keyboard, mouse, one or more serial ports, and one or more [[parallel 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.', 44 => false, 45 => 'Personal computers may use a serial port to interface to devices such as [[Uninterruptible power supply|uninterruptible power supplies]]. 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.', 46 => false, 47 => '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 [[Programmable logic controller|PLCs]], [[Variable-frequency drive|VFDs]], [[servo drive]]s, and [[Numerical control|CNC equipment]] are programmable via RS-232. Some manufacturers have responded to this demand: Toshiba re-introduced the [[D-subminiature|DE-9M]] connector on the [[Toshiba Tecra|Tecra]] laptop.', 48 => false, 49 => 'Serial ports with RS-232 are also commonly used to communicate to [[headless system]]s such as [[server (computing)|servers]], where no monitor or keyboard is installed, during boot when [[operating system]] is not running yet and therefore no network connection is possible. An RS-232 serial port can communicate to some [[embedded system]]s such as [[Router (computing)|routers]] as an alternative to network mode of monitoring.', 50 => false, 51 => '==Standard details==', 52 => 'In RS-232, user data is sent as a [[time-series]] of [[bit]]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.', 53 => false, 54 => '===Voltage levels===', 55 => '[[Image:Rs232 oscilloscope trace.svg|thumb|160px|right| Diagrammatic oscilloscope trace of voltage levels for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit. This is typical for start-stop communications, but the standard does not dictate a character format or bit order.]]', 56 => false, 57 => '[[File:RS232-UART Oscilloscope Screenshot.png|thumb|Upper picture: RS-232 data line on the terminals of the receiver side (RxD) probed by an oscilloscope (for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop bit and no parity bits). Lower picture: Same signal after going through a RS-232 level shifter; note the reversed signal logic and the TTL- or CMOS-compatible voltage levels ready to be fed into an UART (RIN).]]', 58 => false, 59 => '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 ground/common 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 defined as a negative voltage, the signal condition is called "mark". Logic zero is positive and the signal condition is termed "space". Control signals have the opposite polarity: the asserted or active state is positive voltage and the deasserted or inactive state is negative voltage. Examples of control lines include request to send (RTS), clear to send (CTS), [[data terminal ready]] (DTR), and data set ready (DSR).', 60 => false, 61 => 'The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5&nbsp;V, ±10&nbsp;V, ±12&nbsp;V, and ±15&nbsp;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&nbsp;volt supply. 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]], or how fast the signal changes between levels, is also controlled.', 62 => false, 63 => '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.', 64 => false, 65 => '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 (electricity)|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 USB, [[RS-422]] and [[RS-485]] can tolerate larger ground voltage differences because of the differential signaling.<ref>{{cite web|last=Wilson|first=Michael R.|title=TIA/EIA-422-B Overview|url=http://www.national.com/an/AN/AN-1031.pdf|work=Application Note 1031|publisher=National Semiconductor|accessdate=28 July 2011|month=January|year=2000}}</ref>', 66 => false, 67 => '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, for example with a pullup resistor. Some devices provide test voltages on their interface connectors for this purpose.', 68 => false, 69 => '===Connectors===<!-- This section is linked from [[Data terminal equipment]] -->', 70 => '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]] 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 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 specifies 20 different signal connections. Since most devices use only a few signals, smaller connectors can often be used.', 71 => false, 72 => 'For PC technology leading manufacturers started early to replace the once common DB-25M connector by the more compact and thus somewhat cheaper DE-9M connector for their devices. As the pin assignments needed to be condensed a noticeably different pin order was selected for that mechanical variant (for this see [[Serial_port#Pinouts|serial port]]). This type of connector became the de-facto standard for PCs and as well for many other DTE devices.', 73 => false, 74 => '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]] 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.', 75 => false, 76 => '===Signals ===', 77 => false, 78 => 'The following table lists commonly used RS-232 signals and pin assignments.<ref>{{cite web |url=http://www.hardwarebook.info/Serial_(PC_9) |title=Serial (PC 9)|work=Hardware Book|author=Ögren, Joakim|date=18 September 2008|accessdate=28 July 2011}}</ref> See [[Serial_port#Pinouts|serial port (pinouts)]] for non-standard variations including the popular [[DE-9]] connector.', 79 => false, 80 => '{| class="wikitable" style="margin:auto; text-align:center;"', 81 => '! colspan="3" | Signal !! colspan="2" | Origin !! rowspan="2" | [[D-subminiature|DB-25]] pin', 82 => '|-', 83 => '! Name !! width="400px" | Typical purpose !! Abbreviation !! DTE !! DCE', 84 => '|-', 85 => '| align="left" | [[Data Terminal Ready]] || align="left" | Indicates presence of DTE to DCE. || DTR || ● || || 20', 86 => '|-', 87 => '| align="left" | [[Data Carrier Detect]] || align="left" | DCE is connected to the telephone line. || DCD || || ● || 8', 88 => '|-', 89 => '| align="left" | Data Set Ready || align="left" | DCE is ready to receive commands or data. || DSR || || ● || 6', 90 => '|-', 91 => '| align="left" | Ring Indicator || align="left" | DCE has detected an incoming ring signal on the telephone line. || RI || || ● || 22', 92 => '|-', 93 => '| align="left" | Request To Send || align="left" | DTE requests the DCE prepare to receive data. || RTS || ● || || 4', 94 => '|-', 95 => '| align="left" | Clear To Send || align="left" | Indicates DCE is ready to accept data. || CTS || || ● || 5', 96 => '|-', 97 => '| align="left" | Transmitted Data || align="left" | Carries data from DTE to DCE. || TxD || ● || || 2', 98 => '|-', 99 => '| align="left" | Received Data || align="left" | Carries data from DCE to DTE. || RxD || || ● || 3', 100 => '|-', 101 => '| align="left" | Common Ground || || GND || colspan="2" | <small>common</small>|| 7', 102 => '|-', 103 => '| align="left" | Protective Ground || || PG || colspan="2" | <small>common</small>|| 1', 104 => '|}', 105 => false, 106 => 'The signals are named from the standpoint of the DTE. [[Single-ended signalling|The ground signal is a common return]] for the other connections. The DB-25 connector includes a second "protective ground" on pin 1.', 107 => false, 108 => '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:', 109 => '{| class="wikitable" style="margin:auto;"', 110 => '! Signal !! Pin', 111 => '|-', 112 => '| Common Ground || 7 (same as primary)', 113 => '|-', 114 => '| Secondary Transmitted Data (STD) || 14', 115 => '|-', 116 => '| Secondary Received Data (SRD) || 16', 117 => '|-', 118 => '| Secondary Request To Send (SRTS) || 19', 119 => '|-', 120 => '| Secondary Clear To Send (SCTS) || 13', 121 => '|-', 122 => '| Secondary Carrier Detect (SDCD) || 12', 123 => '|}', 124 => false, 125 => false, 126 => false, 127 => false, 128 => false, 129 => '''Ring Indicator''' (RI), is a signal sent from the modem to the terminal device. It indicates to the terminal device that the phone line is ringing. In many computer serial ports, a [[hardware interrupt]] 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 is a one-way signal from the modem to the terminal (or more generally, the DCE to the DTE) that does not correspond to another signal that carries similar information the opposite way.', 130 => false, 131 => '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]] patterns.', 132 => false, 133 => 'The Ring Indicator signal is used by some older [[uninterruptible power supply|uninterruptible power supplies]] (UPS's) to signal a power failure state to the computer.', 134 => false, 135 => 'Certain personal computers can be configured for [[wake-on-ring]], allowing a computer that is suspended to answer a phone call.', 136 => false, 137 => '===Cables===', 138 => '{{main|Serial cable}}', 139 => false, 140 => '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 {{convert|50|ft}} 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 {{convert|1,000|ft}}.<ref>{{cite web |url = http://aplawrence.com/Unixart/serial.art.html |title = Serial Wiring|year=1992|work=A. P. Lawrence |author =Lawrence, Tony|accessdate=28 July 2011}}</ref> For longer distances, other signal standards are better suited to maintain high speed.', 141 => false, 142 => 'Since the standard definitions are not always correctly applied, it is often necessary to consult documentation, test connections with a [[breakout box]], 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]]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]]). If a given cable will not allow a data connection, especially if a [[Gender changer]] is in use, a [[Null modem]] may be necessary.', 143 => false, 144 => '==Conventions ==', 145 => '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 ports of the original [[IBM PC]]. This implementation used an [[8250 UART]] using [[asynchronous start-stop]] character formatting with 7 or 8 data bits per frame, usually [[ASCII]] 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]], users must manually set the baud rate (and all other parameters) at both ends of the RS-232 connection.', 146 => false, 147 => '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 modems. 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.<ref>''InfoWorld'' 30 Mar 1992 page 80</ref> 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.', 148 => false, 149 => '===RTS/CTS handshaking===', 150 => '{{Further2|[[flow control (data)#Hardware flow control|Flow control (data)]]}}', 151 => '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 does not otherwise exist in RS-232. There is no way for the DTE to indicate that it is unable to accept data from the DCE.', 152 => false, 153 => '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.<ref>{{cite newsgroup', 154 => ' | title = Re: EIA-232 full duplex RTS/CTS flow control standard proposal', 155 => ' | author = [email protected] (Casey Leedom)', 156 => ' | date = 1990-02-20', 157 => ' | newsgroup = comp.dcom.modems', 158 => ' | id = <[email protected]>', 159 => ' | url = http://groups.google.com/group/comp.dcom.modems/msg/39042605325cc765?dmode=source', 160 => ' | accessdate = 2008-04-30}}</ref>', 161 => false, 162 => '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.', 163 => false, 164 => '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.', 165 => false, 166 => 'RTS/CTS handshaking is an example of [[Flow control (data)#Hardware flow control|hardware flow control]].', 167 => 'However, "hardware flow control" in the description of the options available on an RS-232-equipped device does not always mean RTS/CTS handshaking.', 168 => false, 169 => '===3-wire and 5-wire RS-232===', 170 => '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.', 171 => false, 172 => '==Seldom used features==', 173 => 'The EIA-232 standard specifies connections for several features that are not used in most implementations. Their use requires 25-pin connectors and cables.', 174 => false, 175 => '===Signal rate selection===', 176 => '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.', 177 => false, 178 => '===Loopback testing===', 179 => 'Many DCE devices have a [[loopback]] 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.', 180 => false, 181 => '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]]'').', 182 => false, 183 => 'Loopback testing is often performed with a specialized DTE called a [[bit error rate test]]er (or BERT).', 184 => false, 185 => '===Timing signals===', 186 => 'Some synchronous devices provide a [[clock signal]] 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.', 187 => false, 188 => '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.', 189 => false, 190 => 'Synchronous clocking is required for such protocols as [[Synchronous Data Link Control|SDLC]], [[HDLC]], and [[X.25]].', 191 => false, 192 => '===Secondary channel===', 193 => '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).', 194 => false, 195 => '==Related standards==', 196 => 'Other serial signaling standards may not interoperate with standard-compliant RS-232 ports. For example, using the [[Digital signal#Logic voltage levels|TTL]] levels of near +5 and 0&nbsp;V puts the mark level in the undefined area of the standard. Such levels are sometimes used with {{nowrap|[[NMEA 0183]]-compliant}} [[Global Positioning System|GPS]] receivers and [[fishfinder|depth finders]].', 197 => false, 198 => 'A 20&nbsp;mA [[current loop]] uses the absence of 20&nbsp;mA current for high, and the presence of current in the loop for low; this signaling method is often used for long-distance and [[optical isolator|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 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.', 199 => false, 200 => 'Other serial interfaces similar to RS-232:', 201 => '*[[RS-422]] (a high-speed system similar to RS-232 but with [[differential signaling]])', 202 => '*[[RS-423]] (a high-speed system similar to RS-422 but with [[Unbalanced line|unbalanced signaling]])', 203 => '*[[RS-449]] (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)', 204 => '*[[RS-485]] (a descendant of RS-422 that can be used as a bus in multidrop configurations)', 205 => '*[[MIL-STD-188]] (a system like RS-232 but with better impedance and rise time control)', 206 => '*[[EIA-530]] (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)', 207 => '*[[EIA/TIA-561]] 8 Position Non-Synchronous Interface Between Data Terminal Equipment and Data Circuit Terminating Equipment Employing Serial Binary Data Interchange', 208 => '*[[EIA/TIA-562]] Electrical Characteristics for an Unbalanced Digital Interface (low-voltage version of EIA/TIA-232)', 209 => '*TIA-574 (standardizes the 9-pin D-subminiature connector pinout for use with EIA-232 electrical signalling, as originated on the IBM PC/AT)', 210 => false, 211 => '==Development tools==', 212 => '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]] 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]] or other common codes and to interpret common protocols used over RS-232 such as [[Synchronous Data Link Control|SDLC]], [[HDLC]], [[DDCMP]], and [[X.25]]. 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 computers.', 213 => false, 214 => '==References==', 215 => '{{Commons category|RS-232}}', 216 => '{{Wikibooks|Serial Programming:RS-232 Connections}}', 217 => '{{reflist}}', 218 => false, 219 => '{{DEFAULTSORT:Rs-232}}', 220 => '[[Category:Telecommunications equipment]]', 221 => '[[Category:Computer hardware standards]]', 222 => '[[Category:Networking standards]]' ]
Whether or not the change was made through a Tor exit node (tor_exit_node)
0
Unix timestamp of change (timestamp)
1373723855