Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
RS-232
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=={{anchor|Flow control}}Physical interface== In RS-232, user data is sent as a [[time-series]] of [[bit]]s. Both [[Synchronous serial communication|synchronous]] and [[Asynchronous serial communication|asynchronous]] transmissions are supported by the standard. In addition to the data circuits, the standard defines a number of control circuits used to manage the connection between the DTE and DCE. Each data or control circuit only operates in one direction, that is, signaling from a DTE to the attached DCE or the reverse. Because transmit data and receive data are separate circuits, the interface can operate in a [[full duplex]] manner, supporting concurrent data flow in both directions. The standard does not define character framing within the data stream or character encoding. ==={{anchor|DSR}}Voltage levels=== [[File: Rs232 oscilloscope trace.svg|thumb|Diagrammatic oscilloscope trace of voltage levels for an [[ASCII]] "K" character (4Bh = 01001011b) with 1 start bit, 8 data bits (least significant bit first), 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|RS-232 data line on the terminals of the receiver side (RxD) probed by an oscilloscope (for an [[ASCII]] "K" character (4Bh = 01001011b) with 1 start bit, 8 data bits, 1 stop bit, and no parity bits)]] The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels for the data transmission and the control signal lines. Valid signals are either in the range of +3 to +15 volts or the range β3 to β15 volts with respect to the "Common Ground" (GND) pin; consequently, the range between β3 and +3 volts is not a valid RS-232 level. For data transmission lines (TxD, RxD, and their secondary channel equivalents), logic one is represented as a negative voltage and the signal condition is called "mark". Logic zero is signaled with a positive voltage and the signal condition is termed "space". Control signals have the opposite polarity: the asserted or active state is positive voltage and the de-asserted or inactive state is negative voltage. Examples of control lines include request to send (RTS), clear to send (CTS), [[data terminal ready]] (DTR), and data set ready (DSR). {| class="wikitable" |+ RS-232 logic and voltage levels ! Data circuits !! Control circuits !! Voltage |- | 0 (space) || Asserted || +3 to +15 V |- | 1 (mark) || Deasserted || β15 to β3 V |} The standard specifies a maximum [[open-circuit voltage]] of 25 volts: signal levels of Β±5 V, Β±10 V, Β±12 V, and Β±15 V are all commonly seen depending on the voltages available to the [[line driver]] circuit. Many RS-232 driver chips have inbuilt [[charge pump]] circuitry to produce the required voltages from a 3 or 5 volt supply. RS-232 drivers and receivers must be able to withstand indefinite short circuits to the ground or to any voltage level up to Β±25 volts. The [[slew rate]], 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 [[RS-422]] or [[RS-485]] can tolerate larger ground voltage differences because of the differential signaling.<ref>{{cite web |author-last=Wilson |author-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]] |access-date=2011-07-28 |date=January 2000 |url-status=dead |archive-url=https://web.archive.org/web/20100106194629/http://www.national.com/an/AN/AN-1031.pdf |archive-date=2010-01-06}}</ref> Unused interface signals terminated to the ground will have an undefined logic state. Where it is necessary to permanently set a control signal to a defined state, it must be connected to a voltage source that asserts the logic 1 or logic 0 levels, for example with a [[pull-up resistor]]. Some devices provide test voltages on their interface connectors for this purpose. ===Connectors=== <!-- [[Data terminal equipment]] links here. --> RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Circuit-terminating Equipment (DCE); this defines at each device which wires will be sending and receiving each signal. According to the standard, male connectors have DTE pin functions, and female connectors have DCE pin functions. Other devices may have any combination of connector gender and pin definitions. Many terminals were manufactured with female connectors but were sold with a cable with male connectors at each end; the terminal with its cable satisfied the recommendations in the standard. The standard recommends the [[D-subminiature]] 25-pin connector up to revision C, and makes it mandatory as of revision D. Most devices only implement a few of the twenty signals specified in the standard, so connectors and cables with fewer pins are sufficient for most connections, more compact, and less expensive. Personal computer manufacturers replaced the [[DB-25M]] connector with the smaller [[DE-9M]] connector. This connector, with a different pinout (see [[Serial port pinout]]s), is prevalent for personal computers and associated devices. Presence of a 25-pin D-sub connector does not necessarily indicate an RS-232-C compliant interface. For example, on the original IBM PC, a male D-sub was an RS-232-C DTE port (with a non-standard [[current loop]] interface on reserved pins), but the female D-sub connector on the same PC model was used for the [[parallel port#Centronics|parallel "Centronics" printer port]]. Some personal computers put non-standard voltages or signals on some pins of their serial ports. ===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|15|m|abbr=on|-1}} long will have too much capacitance, unless special cables are used. By using low-capacitance cables, communication can be maintained over larger distances up to about {{convert|300|m|abbr=on|-2}}.<ref>{{cite web |url=http://aplawrence.com/Unixart/serial.art.html |title=Serial Wiring |date=1992 |work=A. P. Lawrence |author-last=Lawrence |author-first=Tony |access-date=2011-07-28}}</ref> For longer distances, other signal standards, such as [[RS-422]], are better suited for higher speeds. Since the standard definitions are not always correctly applied, it is often necessary to consult documentation, test connections with a [[breakout box]], 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 below. Cables with 9 pins on one end and 25 on the other are common. Manufacturers of equipment with [[8P8C]] connectors usually provide a cable with either a DB-25 or DE-9 connector (or sometimes interchangeable connectors so they can work with multiple devices). Poor-quality cables can cause false signals by [[crosstalk]] between data and control lines (such as [[#RI|Ring Indicator]]). If a given cable will not allow a data connection, especially if a [[gender changer]] is in use, a [[null modem]] cable may be necessary. Gender changers and null modem cables are not mentioned in the standard, so there is no officially sanctioned design for them.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
RS-232
(section)
Add topic