RS-232

In telecommunications, the recommended standard 232 [1], RS-232, refers to a standard introduced in 1960 [2] for serial data transmission. It formally defines the signals which are connected between a DTE (data terminal), for example a computer terminal, and a DCE (data line termination device or data communication device), for example a modem. The standard defines the electrical characteristics and timing of the signals, their significance and the physical dimensions and pin assignments of the connectors. The current version of the standard is TIA-232-F, published in 1997. Interface between data terminals and data lines with serial binary data exchange. The RS-232 standard has been widely used in serial computer ports.

An RS-232 compliant serial port was standard on many computer types. They used personal computers not only for modem connections but also for printers, mice, data storage, UPS and other devices.

Compared to the latest interfaces such as RS-422, RS-485 and Ethernet, the RS-232 has a lower transmission rate, short maximum cable length, high voltage, large standard plugs and no multipoint capacity and limited multipoint capacity. In modern personal computers, USB has replaced the RS-232 interface with most peripheral interface features. Many computers are no longer equipped with RS-232 ports and must use an external USB / RS-232 converter or an internal expansion card with one or more serial ports for connection to RS-232 devices. However, due to their simplicity and their ubiquitous past, RS-232 interfaces continue to be used, especially in industrial machines, network devices, and scientific equipment where a short-range wired data cable points to low-speed points.

Purpose of the standard

  • The RS-232-C standard [3] of the Electronic Industries Association (EIA) since 1969 defines:
  • Characteristics of electrical signals such as voltage level, signaling speed, signal synchronization and sampling frequency, voltage resistance, short-circuit behavior and maximum load capacity.
  • Mechanical properties of the interface, connectors and pin identification.
  • Functions of individual circuits in the interface connection.
  • Standard subcircuits of interface circuits for certain telecommunication applications.

The standard does not define elements such as character encoding (ASCII, EBCDIC or others), character frames (start or end bits, etc.), bit transfer order or bit registers. error detection. The character format and the transfer rate are defined by the hardware of the serial port, usually a UART, which may also include a circuit to convert the internal logic levels to RS-232 compatible signal levels. The standard does not define transmission rates, except that transmission rates are less than 20,000 bits per second.

History

RS-232 was first used as a standard recommended by the Electronic Industry Association (EIA) in 1960 [4] [1]. Initial DTEs are electromechanical teletypes and original DCEs (mostly) modems. When used with electronic terminals (intelligent and scary), they are usually designed to be TTY interchangeable and thus support RS-232.

Because the standard does not have any requirements for external devices, such as computers, printers, testing tools, payment terminals, etc., designers have implemented a compatible RS-232 interface on their devices, usually explaining the idiosynthetic standard. The common problems that have arisen are the determination of unusual switches for unusual or missing connectors or control signals. Independence leads to a growing sector for connecting connectors, connection boxes, test equipment, books and other equipment to other sectors. A general deviation from the standard is signal control at a lower voltage. Some manufacturers have built-in transmitters that operate at +5 V and -5 V and “RS-232 compatible” calls.

Later, personal computers (and other devices) use standards to connect existing devices. A compatible RS-232 port is a standard serial feature for many years, such as: modem connections on multiple computers (the computer has worked as a DTE). It is widely used until the late 1990s, and has been widely replaced by other interface standards, such as USB for PC peripherals. The RS-232 is still used to connect older device types, industrial equipment (eg programmable logic controllers), console ports, and special devices.

This standard has been changed many times in history after the name of the sponsored organization has changed. It also has the names of EIA RS-232, EIA 232 and more recently TIA 232. The standard was updated and updated by the Electronic Industries Association and since 1988 the Telecommunications Industry Association (TIA). [5] Revision C was published in a document in August 1969. Revision D was published in 1986. The current revision is the TIA-232-F interface between data terminal systems and devices. the termination of the data circuit using serial binary data exchange, published in 1997. Changes since the change of C relating to synchronization and details to improve connecting to CCITT V.24, although the current standard is in harmony with the standards. previous versions.

The associated ITU-T standards include V.24 (circuit identification) and V.28 (voltage characteristics and signal synchronization).

In the revision of the EIA-232, the D-subminiature connector is formally included in the standard (this is only referred to in Appendix RS-232-C). The voltage range is extended to ± 25 volts and the limit of the capacitance of the circuit is specifically referred to as 2500 pF. EIA-232 Revision E introduces a new “Alt A” standard connector for 26-pin D-shell housing and other modifications made to improve compatibility with the standards of CCITT V.24, V .28 and ISO improve. 2110.

Overview:

  • EIA RS-232 (May 1960) “Path between data and data terms”
  • RRP RS-232-A (October 1963)
  • RRP RS-232-B (October 1965)
  • EIA RS-232-C (August 1969) “Data Devices Interface and Data Transmission, Serial Data Transmission”
  • EIA EIA-232-D (1986)
  • TIA TIA / EIA-232-E (1991) “Data and Stylish Lighting Data Transfer Devices with a Work Act Launched by a Man” \ t
  • TIA TIA / EIA-232-E (1997-10-01)
  • ANSI / TIA-232-F-1997 (R2002)
  • TIA TIA-232-F (R2012)

Standard limitations

  • Because RS-232 is used outside of the original purpose of connecting to a terminal in a modem, standards are developed later to withstand these limits. The RS-232 standard problems are: [7]
  • High voltage fluctuations as well as positive and negative current requirements increase the energy consumption of the interface and intensify energy planning. The voltage change request also limits the maximum speed of a compatible interface.
  • Asymmetric signaling with respect to a common signal of mass limitations in immune to intrusion and distance transmission.
  • The multipoint connection between more than two devices is not defined. Although multipoint “alternatives” are developed, their speed and compatibility are limited.
  • The standard does not relate to the possibility of connecting DTE directly to a DTE or DCE in a DCE. Zero modem cables can be used to make connections, but they are not defined by the standard and some cables use different connections.
  • The definitions of the two ends of the connection are asymmetric. It does the role assignment of a new concept device with a problem. The designer must choose a DTE or DCE interface and pinned assignments.
  • The handshake interface and line controls are used to configure and remove the dial-up communication circuit. In particular, the use of connection lines for power control is unreliable in many devices.
  • There is no way to use a device. While it is possible to get a small amount of energy from the DTR and RTS lines, this is only suitable for low-power devices, such as mice.
  • The standard 25-pin D-sub connector is great compared to current practice.

Roll into modern PCs

PCI Express x1 card with RS-232 port with a 9-pin connector

In PC Hardware Guide [8], Microsoft does not recommend RS-232 compatible serial port support for IBM PC’s original design. Currently, the standard RS-232 is replaced by PCs for local communication via USB. The advantages of RS-232 are USB faster, utilizing lower voltages and offering simpler connections for connectivity and use. USB disadvantages via RS-232 have USB with less interference (electromagnetic) (EMI) and the maximum length of used USB cable speeds is shorter.

RS-232 devices can still be used in areas such as laboratory automation or checking. Some types of programmable logic controllers, frequency converters, servo drives, and computer control control units can be used by RS-232. Computer manufacturers respond to this request by reconnecting the DE-9M connector on their computer or offering adapters.

RS-232 ports are often used for communication with non-UI systems, such as servers without a monitor or control panel installed. This happens at startup when the operating system is not ready for use and a network connection is not possible. A computer with RS-232 serial interface can interact with a combined system’s serial interface (such as a router) instead of tracking via Ethernet.

Physical interface

In RS-232, the user data is sent as a series of time bits. The quality supports simultaneous and abnormal transitions. In addition to data circuits, the standard refers to a number of control circuits used to manage the connection between DTE and DCE. Not all data or control circuits operate only in one direction, or by indicating the DTE signal to the DCE linked or vice versa. Transmission and data reception are separate circuits, the interface can operate in full duplex mode and support the same data flow in both directions. The rules do not apply to character frames in the data stream or character encoding.

voltage levels

Oscilloscope track voltage diagram for ASCII character “K” (0x4B) with 1 bit boot, 8 bit data (first bit significant at least), 1 bit stop. This is common in startup communication, but the quality does not support a character format or bit.

RS-232 data on receiver terminals (RxD) is tested with oscilloscope (for ASCII character “K” (0x4B) with 1 boot bit, 8 bit data, 1 stop bit and no equality).

The RS-232 standard refers to the voltage levels that match the logic level and zero logic level for data transmission lines and sign control lines. The correct sign is from +3 to +15 volts or from -3 to -15 volts around the origin point (GND). The range between -3 and +3 volts is therefore not a valid level of RS-232. For data transmission lines (TxD, RxD and the second equivalent channel), a negative voltage logic is indicated and the position of the signal is called a “marker”. Zero logic has a signal with a positive voltage and the position of the sign is called “space”. The other polarity is the control polarity: the certified or active state is a positive voltage and the deactivated or inactive state is a negative voltage. Examples of control lines are Send Request (RTS), Send Clear (CTS), Data Ready Terminal (DTR) and Data Resolution Set (DSR).

Logic level and voltage RS-232

Data circuits Control circuits Voltage
0 (space) Asserted +3 to +15 V
1 (mark) Deasserted −15 to −3 V

The maximum standard voltage without voltage of 25 volts in particular: ± 5V, ± 10V, determined 12V and V 15V levels are generally determined based on the voltages available to the line control line. Some RS-232 routing chips are distributed to generate the required voltages for a 3 or 5 volt supply. RS-232 drivers and receivers must enter an unspecified level of ground fault or voltage up to ± 25 volts. The speed of change is controlled or the speed that the signal changes between levels.

Since the voltage levels are higher than the logic levels normally used with integrated circuits, special intermediate control circuits are required to convert logic levels. They also protect the device’s internal circuit from possible short circuits or transistors at the RS-232 interface and provide sufficient power to meet the speed requirements of the data transfer scan.

As both of the circuit RS-232 depends on the ground pin being at zero volts, problems with connecting machines and computers, the voltage between the land pin on one end and the ground pin is not another. It can also create a hard loop. General mass RS-232 limiting to relatively short cables. If the two devices are long enough apart or in separate power systems, the local land connections at each end of the cable have different voltages. This difference reduces the signal to noise ratio. Equal differential layers such as RS-422 or RS-485 tolerate more potential land differences due to differential signage. [9]

Unused interfaced signals have an unallocated logic state whose termination is established. If a control signal needs to be fixed permanently in a defined state, it must be connected to a voltage source that accepts the level 1 or 0 logic, for example with a resistor. Some devices provide test voltages at their interface terminals for this purpose.

Plug

RS-232 units can be classified as Data Completion Equipment (DTE) or Circuit Data Termination Equipment (DCE). It defines each unit with wires that begin and receives each signal. According to the standard, male connectors have the functions of the DTE pin and available functions of the female DCE pin. Other devices may have any combination of tutorial definitions and spindles. Many terminals are made with sockets, but are sold only through a cable with plugs. Standard cable suggestions are available on the terminal.

The standard 25-pin D-subminiature connection recommends up to C and makes it in control D. Most devices only use a portion of the twenty signals specified in the standard. The plug and cable are enough. fewer connections, closer and cheaper. Instead of the DB-25M connector, PC manufacturers are replaced by a smaller DE-9M connector. This connector with another solid assignment (see serial pin assignment) is common to PCs and related peripherals.

The D-Sub 25-pin interface can not display a compatible RS-232-C interface. For example, the RS-232-C DTE on the IBM D port is the original IBM PC port (with an unusual loop interface on a reserved pin), but the same D-Sub female connection as the connection used is used. “Centronics” printer in parallel. Some PCs add particular pins to their serial or unusual serial numbers.

Cable

The standard does not refer to the maximum cable length, but to the maximum capacity that a compatible circuit reader must support. A general rule is that cables longer than 15 meters are very high when special cables are not used. With the help of cables with a low capacity, communication can be maintained over large distances of up to 300 meters. [10] Over long distances, other signal standards such as RS-422 are better for higher speeds.

Common sense is not always applied correctly. Often you have to read the documentation, test the couplings in a junction box or search for the suitable cable for trial and error when connecting two devices. The DCE device and the fully compatible cable of the DTE device that connects identical pin codes to each connector (“direct cable”). Gender changes are available to resolve gender differences between cables and connections. When connecting peripherals with different types of connectors, you need a cable that connects the corresponding pins as shown in the following table. The 9-pin cables at one end and 25 at the other end are normal. Equipment manufacturers equipped with 8P8C connectors usually provide a cable with a DB-25 or DE-9 connector (or sometimes an in-replacement connector to transport multiple devices). Insufficient cable quality can cause false signals due to cross-talk between data and control lines (eg Ring indicator).

If a particular cable does not allow a data connection, especially if a gender change is used, a cable modem can be voided. The gene switches and cables are not standardized and are therefore not officially allowed.

RS-232 med 3 og 5 ledninger

En “3-strengs” RS-232-forbindelse bruges normalt, som omfatter transmission, modtagelse og massedata, når der ikke kræves fuld RS-232-funktionalitet. Det er ogågigt at bruge en to-leder forbindelse (date og jord), hvis datastrømmen er ensrettet (for eksempel en digital arbejdskala med en regulær vægtværdi eller en GPS-modtager, der regelmæssigt sender et websted, hvis det ikke er konfigureret) via RS-232 (påkrævet) Hvis der foruden enkeltrumsdata kræves hardwareflowstyring, indstilles RTS- og CTS-linjerne i en 5-tråds version.

Data and control signals

The following tables used RS-232 signs (known as “circuits” in the specifications) and their determinants on the proposed SS-25 connections. (For more information on general connectors that are not defined by default, see Pinout of the Serial Port.)

Circuit Direction DB-25 pin
Name Typical purpose Abbreviation DTE DCE
Clear To Send DCE is ready to accept data from the DTE. CTS in out 5
Common Ground Zero voltage reference for all of the above. GND common 7
Data Carrier Detect DCE is receiving a carrier from a remote DCE. DCD in out 8
Data Set Ready DCE is ready to receive and send data. DSR in out 6
Data Terminal Ready DTE is ready to receive, initiate, or continue a call. DTR out in 20
Protective Ground Connected to chassis ground. PG common 1
Ready To Receive DTE is ready to receive data from DCE. If in use, RTS is assumed to be always asserted. RTR out in 4
Received Data Carries data from DCE to DTE. RxD in out 3
Request To Send DTE requests the DCE prepare to transmit data. RTS out in 4
Ring Indicator DCE has detected an incoming ring signal on the telephone line. RI in out 22
Transmitted Data Carries data from DTE to DCE. TxD out in 2

Signs are designated from the perspective of DTE. The land pin for the other connections is a common return conductor and fixes the “zero” voltage, called the voltages of the other pins. The second “protected land” is on pin 1 in the DB-25 connector; This is internally connected to the ground of the device and cannot be connected to the cable or to the jack with the signal ground.

Ring Indication

The ringer indicator (RI) is a signal sent from the DCE device to the DTE device. Shows the terminal that touches the telephone line. In many computer ports, hardware interference is generated when the status of IN changes position. Support for this hardware interrupt means that a program or operating system can be notified of a change in the IN position without the software always having to ‘pin’ the pin status. RI does not match another character that carries similar information in the opposite direction.

For an external modem, the status of the ring pen is often added to the “AA” indicator (automatic response). This includes whether the RI sign is protected by a ringtone. The indicated RI sign closely follows the ring pattern, allowing the software to detect certain types of rings.

Some non-sterile power supplies (old tests) use the ring signal to indicate a power failure signal on the computer.

Some computers can be configured to activate so that a computer with a suspended computer can answer a call.

RTS, CTS and RTR

The RTS and CTS signals were originally defined for use in semi-duplex (each unique) modems such as Bell 202. These modems disable their transmitters when they are not needed and must send the preamble to the receiver’s synchronization. The DTE defines the RTS to indicate the desire to be sent to the DCE, and in response, the DCE grants the CTS permission to grant permission once the synchronized DCE has reached the extreme. These modems can not be used anymore. There is no signal that the DTE can be used to temporarily stop the DCE input data. The use of RS-232 RTS and CTS signals is therefore asymmetric, based on earlier versions of the standard.

This method is also used with current RS-485 RS-232 converters. RS-485 is a multi-access bus that can only transmit one device at a time, a concept that is not equipped with RS-232. The RS-232 device allows the RTS to tell the converter that the RS-485 bus must control so that the converter and thus the RS-232 device can send data to the bus.

The modern communications environment uses full-duplex modems (both directions at the same time). In this area DTE has no reason to abolish the RTS. Because of the ability to change line quality, data processing delays, etc., symmetric bidirectional flow control is required.

A symmetrical alternative to current control in the same direction was developed and launched by various equipment manufacturers in the late 1980s. This changes the RTS signal, which means that DTE is ready to receive data from DCE. This method is eventually encoded in RS-232-E (currently TIA-232-E), which identifies a new signal “RTR (Ready to Receive)”, which is the CCITT circuit V. 24 133. The TIA-232-E and the corresponding international standards are updated to show that the circuit 133 is implemented with the same pin as the RTS (Request to Send) and that, using 133, the RCE is always acknowledged from the DCE.

In this scheme, known as “RTS / SDR Flow Control” or “RTS / SDR Link Exchange” (although RTR / CTS is the correct technical name, the RTR works when performing its RTR data and DCE CTS received In contrast to the original use of RTS and SDR with half-duplex modems, these two characters operate independently, an example of hardware flow control, but hardware flow control in the description. With the options available, one RS does not always mean that the RTS / SDR can do.

Tools that use this protocol should be ready to mitigate additional data as the remote system starts immediately before disabling the RTR.

Elements that are not often used

The EIA-232 standards define links to specific functions that are not used in most of the execution. Its use requires a connector and 25-pin cables.

Selection of frequency signals

DTE or DCE can indicate a “high” or “low” signal rate. The speed, while the unit chooses the speed, must be configured for DTE and DCE. The default drive selects high frequencies through pin 23 to ON.

Loopback Test

Many DCEs have the loop function to test. If enabled, the signals are returned to the sender instead of being sent to the recipient. If this feature is supported, the DTE can ask the local DCE (attachment) to insert a loop method by placing the pin 18 on ON or on a remote control DCE (connected to the local DCE) to enter the loop of a leg. 21 to activate. The second controls the communication link and the two DCE. When the DCE is in the test method, it gives a DTE signal by adjusting a pin from 25 to ON.

Excludes special winding capacities in the most used loopback test version. The loopback consists of cable hardware that connects additional pins with the same leader (see loop).

The special test, often called the bit error rate test (BERT), is performed by a special DTE.

Signal Synchronization

A number of concurrent devices provide a clock signal to synchronize data transfer, particularly at higher data rates. DCE provides two timing signs at pins 15 and 17. PIN 15 corresponds to the transmitter clock or transmission time (ST); DTE adds the next bit in the data line (pin 2) when this clock is transferred from the mode to the enabled mode (it is stable during switch-off when the DCE bitrate logs). PIN 17 is the receiver clock or reception time (RT); DTE reads the next part of the data line (pin 3) when this clock changes from ON to OFF.

Alternatively, the DTE at pin 24 may provide a clock signal for transmission data called transmitter timing (TT). The data changes when the clock goes from Off to ON and when it reads from switch to ON. The TT can be used to solve the problem of unknown length and cable delay, and transfer a little DTE after another unknown delay and send it back to DCE via the same unknown wiring. As the TT bit ratio can be determined in the DTE design and both signs are crossing the same length of cable, the use of DTT has resolved the problem. The TT can be generated by rebuilding the loop with the appropriate part change to match the data being transmitted. In the ST loop back to TT, DTE DTE can be used as a frequency reference and synchronization to smooth synchronization.

Synchronization is required for protocols such as SDLC, HDLC and X.25.

Secondary Channel

In addition to the main channel, you can use secondary DTE and DCE data channel devices. The pin code activities are as follows:

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

Related Rules

Other serial signal standards may not work with standard RS-232 ports. For example, if you use life levels near +5 and 0V, the character level is set in the undefined area of ​​the standard. These levels are sometimes used with GPS receivers and NMEA 0183 compatible depth probes.

A 20 mA current loop uses the absence of current at 20 mA for the high and the presence of current in the circuit for the low; This signal method is often used for long distance and optically isolated connections. To connect a current loop device to a compatible RS-232 interface, a level shifter is required. Current loop devices can supply voltages above the yielding voltage limits of a compatible device. The original IBM PC serial port card has implemented a 20 mA current loop interface that has never been emulated by other compatible device manufacturers.

Other serial ports similar to RS-232:

  • RS-422 (a fast system similar to RS-232, but with differential signaling)
  • RS-423 (high-speed system similar to RS-422 but with asymmetrical signaling)
  • RS-449 (functional and mechanical interface with RS-422 and RS-423 signals – never detected as RS-232 and removed from the EIA)
  • RS-485 (a descendant of RS-422 that can be used as a bus in multipoint configurations)
  • MIL-STD-188 (a system such as RS-232 but with better impedance and rise time control)
  • EIA-530 (high-speed system using the electrical properties of RS-422 or RS-423 in an EIA-232-pin configuration, combining the best of both, instead of the RS-449)
  • EIA / TIA-561 8-position of the non-synchronous interface between the data terminal and the termination of the data line means with serial exchange binary data
  • EIA / TIA-562 Electrical functions for an asymmetrical digital interface (low-voltage version of EIA / TIA-232)
  • TIA-574 (standardizes the pin assignment of the D-subminiature 9 pin connection for use with the EIA-232 electrical signal, for example IBM PC / AT)

Development Tools

When systems are built with systems based on RS-232, hardware verification can be verified to identify problems. A simple display uses lights to show the status of the data or check the pins. The y cables can be used to use a different serial port to control all traffic in one direction. A series of serial analyzers is a series of logic analyzers, but specializes in RS-232 voltage levels, connections and, if necessary, clock signals. The line series analyzer can collect, store and display control data and signals so that developers can see them in detail. Some show only signs in the form of waveforms. Higher versions include ASCII character readability or other general code and interpreting protocols commonly used in RS-232, for example: Serial line analyzers available as standalone units such as: software cables and interfaces for general analyzers and a logical ascecope, as well as computer and common peripheral programs.