Table of Contents:
- What is RS232 Serial Communication Protocol?
- Main specifications for RS-232
- RS-232 connectors
- RS-232 signals
- RS-232 cables specifications
- RS-232 data flow diagram
- Relationship between RS232 and other standards
What is RS232 Serial Communication Protocol?
RS-232 is a standard that was introduced in the early 60s for serial data transmission and still widely in use mainly because it’s multipurpose, easy to operate and maintain, accessible, and widely supported. It defines not only electrical signal characteristics, such as signal transmission rate, voltage levels, cable length, timing and short-circuit behavior, but many other things as well, including interface’s mechanical characteristics, connectors, and pinouts.
According to RS-232 standard, all the data is transmitted in a time-series of bits. For PC, the most common configuration is asynchronous link sending 7-bit or 8-bit packets. However, this standard supports synchronous transmission too.
With all its merits, RS-232 has some serious limitations in range and data throughput performance, so its main scope of application is industrial gear, networking, and lab equipment.
Main specifications for RS-232
Operation mode: single-ended
Max. cable length: 15.24 meters (50 ft)
Max. data throughput: 20 kbps
Max. driver output voltage: +/-25V
Max. slew rate: 30V/uS
Max. driver current in High Z state: +/-6mA @ +/-2v (power off)
Driver load impedance: 3000-7000 Ohms
Driver output signal level: +/-5V to +/-15V (loaded) or +/-25V (unloaded)
Receiver input resistance: 3000-7000 Ohms
Receiver input voltage range: +/-15V
Receiver input sensitivity: +/-3V
Total Number of Drivers and Receivers on One Line: 1 driver and 1 receiver
RS232 Standart Limitations
What are the known issues with the RS-232 serial port? Using the standard COM port comes with a bunch of limitations that you have to deal with. Here are the obvious limitations of the standard:
- Increased consumption of power due to large voltage swing is a huge complication for the power supply design.
- A lot of devices don’t use the handshake lines for flow control thereby making RS-232 unreliable.
- Although the multi-drop connection issue has been addressed with more reliable alternatives, it still doesn’t compensate for the compatibility and speed limitations of RS232 port.
- The need for a null modem or crossover cable whenever connecting a peripheral to a computer.
- RS-232 doesn’t solve the problem presented by single-ended signaling.
An RS-232 device is either as a Circuit-terminating Equipment (DCE) or as a Data Terminal Equipment (DTE) depending on which wires are used to send and receive each signal.
In accordance with RS-232 standard, DCE is meant for female connectors, and DTE is for male connectors. However, there are devices with all sorts of connector gender/pin definitions combinations. For example, a terminal that has onboard female connectors to come with a cable that has a male connector at each end fully meets the RS-232 standard.
Up to revision C, the standard recommends using D-subminiature 25-pin connector, though it’s mandatory as of revision D only. That's because the vast majority of devices don’t really need all those standard-specified 20 signals, and RS-232 9-pin connections are much cheaper and take up very little space. More compact, and less expensive. This 9-pin RS-232 connector is widely used for personal computers and similar gadgets.
It's worth noting that not every 25-pin D-sub connector has an RS-232-C compliant interface. Some PC manufacturers opt for non-standard signals and voltages on certain pins of their PC COM port pinout. On the original IBM PC, for instance, the female D-sub connector was used for the parallel Centronics printer port.
25-pin serial pinout:
Pin 1: GND − Shield Ground.
Pin 2: TxD → Transmitted Data. Carries data from the Data Terminal to the Data Set.
Pin 3: RxD ← Received Data. Carries data from the Data Set to the Data Terminal.
Pin 4: RTS → Request to Send. Data Terminal signals the Data Set to prepare for data transmission.
Pin 5: CTS ← Clear to Send. Data Set to signals to the Data Terminal that it’s ready for receiving data.
Pin 6: DSR ← Data Set Ready. DCE is ready to receive and send data.
Pin 7: GND − System Ground. Zero voltage reference.
Pin 8: CD ← Carrier Detect. Data Set signals to the Data Terminal about the detected carrier of another device.
Pin 9: Reserved
Pin 10: Reserved
Pin 11: STF → Select Transmit Channel.
Pin 12: S.CD ← Secondary Carrier Detect.
Pin 13: S.CTS ← Secondary Clear to Send.
Pin 14: S.TXD → Secondary Transmit Data.
Pin 15: TCK ← Transmission Signal Element Timing.
Pin 16: S.RXD ← Secondary Receive Data.
Pin 17: RCK ← Receiver Signal Element Timing.
Pin 18: LL → Local Loop Control.
Pin 19: S.RTS → Secondary Request to Send
Pin 20: DTR → Da Remote Loop Control.
Pin 22: RI ← Ring Indicator. Data Set signals to the Data Terminal about a detected ringing condition.
Pin 23: DSR → Data Signal Rate Selector.
Pin 24: XCK → Transmit Signal Element Timing.
Pin 25: TI ← Test Indicator.
During asynchronous communication, both RTS and CTS are on all the way through the session. Yet, if DTE is connected to a multipoint line, data is transmitted by one station at a time (due to the return phone pair sharing), so the only use for RTS is to turn the modem’s carrier on and off. A station raises RTS when it’s ready to transmit. The modem turns on its carrier, waits until it’s stabilized (normally it takes a couple of milliseconds), and raises CTS. While CTS is up, DTE transmits. Once the transmission is finished, the station drops RTS and then the modem drops both CTS and carrier.
All the clock signals on serial cable pins 15, 17, and 24 of the COM port pinout are for synchronous communications only. The clock is extracted from the data stream by DSU or the modem or DSU extracts and sent to the DTE to provide a steady clock signal. It’s important to stress that received and transmitted clock signals needn't be identical and can have different baud rates.
9 pin RS-232 pinout
So here is a simplified version of the serial connection pinout used on personal computers: the RS-232 9 pin pinout.
Pin 1: DCD ← Data Carrier Detect
Pin 2: RxD ← Receive Data
Pin 3: TxD → Transmit Data
Pin 4: DTR → Data Terminal Ready
Pin 5: 0V/COM − 0V or System Ground
Pin 6: DSR ← Data Set Ready
Pin 7: RTS → Request to Send
Pin 8: CTS ← Clear to Send
Pin 9: RI ← Ring Indicator
Voltage levels that represent the signals of RS232 serial port pinouts with respect to a system common (power/logic ground). The active state’s (SPACE) signal level is positive and the idle state’s (MARK) signal level is negative with respect to common. A communications protocol has to be specified by RS-232. Plus, RS-232 has multiple handshaking lines to use with modems (in most cases).
The RS-232 interface assumes that both DTE and DCE have similar electrical busses with identical grounds. Obviously, this assumption can be completely wrong when it comes to the long lines between the DTE and the DCE.
The maximum open-circuit voltage specified by the RS232 standard is 25 V, but normally signal levels 5 V, 10 V, 12 V, and 15 V.
According to the RS-232 standard, all data is bi-polar. For most equipment, an ON or 0-state (SPACE) condition is indicated by voltage from +3 V to +12 V and an OFF or 1-state (MARK) condition is indicated by voltage from -3 V to -12 V. However, some devices don’t recognize any negative levels and 0 V is enough for the OFF state. And sometimes smaller voltages can be enough to achieve the ON state. Thereby it’s possible to significantly reduce the overall range for RS-232 transmission/receiving.
Normal voltage for the output signal is from +12 V to -12 V. Also, there is a so-called “dead area” in a +3 V to -3 V range that is meant for line noise adsorption. In other serial port pinouts similar to RS-232 this range can be different (e.g. the V.10 definition has a +0.3 V to -0.3 V dead area). A whole lot of RS-232 receivers can easily sense differentials of 1 V, or even less.
RS-232 cables specifications
There are no cable length limits defined directly by the RS-232 standard, so the main determining factor is the maximum capacitance tolerated by a compliant drive circuit. As a general rule, the critical length will be 15 m (or about 300 m provided that only low-capacitance cables were used). Frankly speaking, For longer distances, the RS-232 standard isn’t the best option for high-speed long-distance data transfer.
Keeping in mind that not all device manufacturers maintain the standard all the way through, it’s a good practice to study up on the documentation and to use a breakout box to test every new connection. In some cases, only the trial and error method can help to find the right cable to connect each pair of devices.
In compliance with the RS-232 standard, a DCE device must be connected to a DTE through the cable that has identical pin numbers in each connector (known as “straight cable”). Any cable/connector gender mismatches can be easily fixed with gender changers. Also, in common use are cables with a 25-pin D-sub connector on one end and a RS-232 9-pin connector on the other. Any equipment with 8P8C connectors is usually provided with a cable that has a DB-9 or a DB-25. Some even have interchangeable connectors for added flexibility.
If there’s no need to exploit the RS-232 to capacity, you can use a minimal 3-wire connection: transmit, receive, and ground. For a one-way data flow, there is a 2-wire option: data and ground. And for two-way hardware-controlled data transmission, the best alternative is a 5-wire version, that is the same as 3-wire but with the RTS and CTS lines added.
RS-232 data flow diagram
According to the RS-232 standard, data can be transmitted in lots of variations. The most common, however, is sending packets that include a 7-8 bit word, and a start, stop, and parity bits. As you can see on the diagram below, first comes the start bit (active low, +3 V to +15 V), then data bits, followed by the parity bit (if required by protocol), and finally the stop bit (used to bring logic high, -3 V to -15 V).
Relationship between RS232 and other standards
RS-232 compliant ports might not necessarily operate with several other serial signaling standards like RS-422, RS-423, RS-449, RS-422, 423, RS-485 and so on. For GPS receivers and depth finders using a TTL level close to +5 and 0 voltage, the mark level moves to an undefined area of the standard. You will need a current translator to use the RS-232 standard in an environment like this.
How they relate:
- RS-422 has a similar speed with RS-232 but differs in signaling
- RS-423 speed is the same without a balanced signaling
- Rs-449 decommissioned
MIL-STD-188 is similar to RS-232, but has a great rise time control with a better impedance. Thinking of ditching your RS-232 device? Not so fast! As you can see this serial protocol continues to defy all claims that it has been completely replaced by USB. Though modern communication systems require a more sophisticated system like the USB, we are going to continue using the standard serial ports.
Third-party applications have done well in enhancing the way we work with RS-232 serial port. An example is RS232 to Ethernet Connector developed by Electronic Team. You can find interesting usage scenarios in the User Guide.
Frequently Asked Questions
Submit your email address to get a link for quick download on your desktop and get started!