RS232 is the most widely implemented serial interface in the world. It is commonly installed as the serial port (9 pin or 25 pin) on PCs and has become ubiquitous on literally thousands of other applications. See below for comparisons.
Even though RS232 is a very old standard (first standardized in 1962) it is still popular because it is:
- simple, no software stack required, can be used to bring-up microcontrollers or load firmware on a “bare” system
- inexpensive, standard products exist from multiple vendors
- widely understood, support is already built in to most microcontrollers, the basics of serial communication are in most of the textbooks
- performance is adequate for many applications, simple data transfer, text or console ports, diagnostics, peripheral connectivity, etc.
However RS232 does have some limitations:
- It is slow by modern standards. Typical data rates are 1200 baud, 9600 baud, 115.2kbaud. High data rate RS232 devices are available up to 1Mbps. Faster speeds are uncommon.
- Signals swing to both positive and negative voltage. This requires an onboard charge pump to generate signals from a single power-supply chip or else multiple positive and negative supply rails.
- High pin-count per function. All signals are unidirectional and the charge pump requires several pins and external capacitors. So small footprint is difficult to achieve. Cables and connectors use more pins and wires than most modern serial protocols.
- Point-to-point only. Signals go from one driver to one receiver. RS232 does not support bi-directional signals or multiple drivers or receivers.
- Limited distance. RS232 uses single-ended signals which makes it difficult to support long cables. Typical RS232 cables are only about 10 meter or less. High speed (1Mbps) are typically less than 1 meter. The wide driver signal swing makes crosstalk a problem. Unbalanced signals with a shared ground reference are less able to withstand ground shifts between driver and receiver.
- Comparatively high power consumption. The wide signal swing takes quite a bit of power. By the RS232, signals idle at mark-state and receivers have typical 5kΩ impedance to ground, therefore drivers are constantly sourcing current even while idle. Many later RS232 transceivers’ feature shutdown modes or automatic power saving features (such as Auto On-Line, Auto On-Line Plus, Intelligent charge pumps, etc.). However some of the most commoditized devices lack any shutdown function.
RS485 overcomes most of the limitations of RS232 and is an excellent complement to RS232.
- RS485 uses differential signaling and is capable of much higher data rates (up to 20Mbit/sec)
- Differential signals also allow RS485 to communicate over 1200 meter cable lengths. Longer runs are possible with some careful system optimization.
- Bi-directional and multi-drop operation. RS485 can be used to build multidrop networks with many transmitters and many receivers.
- Balanced differential signalling also makes RS485 highly immune to noise. On twisted-pair cables a noise signal will couple equally to both wires in the pair and be ignored by the differential receiver.
RS485 is found mainly in industrial, telecom and commercial applications and is not as widespread in the consumer
or PC world. Therefore it is not seen as often as RS232.
Also the RS485 protocol standard defines only the electrical characteristics of the interface. The physical and logical implementations are left up to the user. Different connectors, different methods for bus-arbitration and data framing all exist under a wide variety of implementations. RS485 has also been used as the foundation for many proprietary or semi-proprietary standards. Therefore interoperability between RS485 based interfaces is not always as simple as with RS232.