RS232 is a standard for serial communication between devices. It is commonly used in computer equipment, although it can also be found in other electronic devices such as TVs and printers. RS232 uses a simple electrical interface that allows two devices to communicate with each other using a serial data link.
The data link consists of two main wires, one for transmit and one for receive(and one extra for Ground connection). It is relatively easy to implement, which has made it popular in a wide range of applications.
Let’s learn about serial communication now.
What is Serial Communication?
Serial communication is a method of transmitting data one bit at a time, over a single communication channel. In most cases, serial communication is used to transmit data between two devices, such as a computer and a modem.
Serial communication is contrasted with parallel communication, in which multiple bits are transmitted at the same time over multiple channels. While serial communication is slower than parallel communication, it has the advantage of being simpler and more reliable.
For these reasons, serial communication is commonly used in computer networks and other applications where data needs to be transmitted accurately and quickly.
There are two types of Serial communication devices:
- Data Terminal Equipment (DTE). For example, a computer
- Data Communication Equipment (DCE). For example, a printer, modem, or any other peripheral devices that support serial communication.
Thus serial communication can be described as the transmission of binary data (0s or 1s) between DTE and DCE. Two DTEs or two DCEs cannot communicate directly.
The procedure of sending data using serial communication obeys a set of rules called serial communication protocol.
RS232C, RS422A, and RS485 are some of the serial communication standards by the Electronic Industries Association (EIA), among which RS232 is a widely used serial communication protocol.
What is the RS232 Protocol?
RS232 is a standard for serial data communications between computers and other devices. The protocol uses a simple three-wire interface consisting of a transmit (TX) line, a receive (RX) line, and a ground (GND) line. Data is transmitted serially, meaning that each bit is sent one after the other on the TX line. The receiving line is used to receive data from the TX line.
RS232 is an asynchronous protocol, meaning that it does not require a clock signal to synchronize data transfer. The simplicity of the RS232 interface makes it widely used in a variety of applications including industrial control, barcode scanners, and GPS receivers. RS232 is also commonly used in debugging tools such as JTAG adapters.
Being one of the EIA standards, RS232 is also known as the EIA232 protocol. It is the most commonly used serial communication protocol in the industry.
RS232 was introduced in the 1960s. Back then, RS232 was preferred for connecting the computers and Programmable Logic Controllers (PLC) with the peripherals such as printers, mice, and modems. But these are now being replaced with modern technologies like Universal Serial Bus (USB).
RS232 standard holds a set of criteria related to signals and connectors. This includes the number of bits, voltage levels, signal timing, electrical characteristics, size and pinout of connectors, etc.
What does RS232 stand for?
All EIA standards start with RS. RS stands for Recommended Standard. But the numbers do not carry a specific meaning.
In this case, the number ‘232’ is assigned with ‘RS’ by EIA to denote the serial communication standard.
Thus RS232 interface is used for serial communication that transmits binary data for the communication of DTEs and DCEs.
What is the Speed and Baud rate of RS232 protocol?
A reliable data transfer with RS232 protocol is possible only for a distance up to 20 meters. The speed of asynchronous transmission using the RS232 protocol is up to 20 kbps(15-20meters). Whereas the maximum possible data rate is 1Mbps(very short distance).
As for the baud rate, standards are 9600, 19200, 38400; for cable length up to 20 meters. The higher baud rates may or may not work, but it’s possible. For example, 38400 and 57600 Baud (bits/s).
What is RS232 used for?
RS232 is mostly utilized in networks with PLCs where a PLC transfers data to other devices with the help of RS232 standard. In this case, the PLCs act as DTE, and the other devices like printers, modems, etc act as DCE.
Some of the common applications of RS232 in serial communication are:
- Simple full-duplex communication with 2 pins.
- Since RS232 supports asynchronous communication, it can replace the systems that face the difficulty of syncing different clocks.
- It can be used for systems that demand better accuracy.
- RS232 is the best choice to control one unit at a time without delay.
RS232 Cable Pinout
RS232 protocol uses a 9-pin DB9 connector. The pinout of the male and female RS232 connectors is shown below.
The description and arrangement of RS-232 male connector pins are given in the table below.
|1||DCD||Data Carrier Direct|
|4||DTR||Data Terminal Ready|
|6||DSR||Data Set Ready|
|7||RTS||Request To Send|
|8||CTS||Clear To Send|
The nine pins of the RS232 connector are divided into three categories:
Data Pins– The flow of the data occurs through the data pins. Pins 2 and 3 are the data pins. These are RxD and TxD pins. The DTE and DCE have the interchanged order for data pins.
Control Pins– The control pins are used to establish the interface between the devices. Pin 1,4,6,7,8,9 fall under the category of control pins.
Reference Pin– The reference pin is meant to be the reference voltage pin. Pin 5 is the reference pin that connects to Ground.
Note: Usually, DTE device(male connector) transmits the signal and DCE device(female connector) receives it. Both the ports have 9 pins. The only difference in their pinout is of the position of transmit and receive pin. The transmit pin in a DTE port is where the receive pin of DCE port is.
RS232 Cables and Connectors
RS232 protocol has dedicated cable and connector standards to support serial data exchange. Let’s know more about the connector and cable used for RS232.
RS232 connector is primarily used for serial data exchange between DTE and DCE. This exchange will be usually with the computer and the peripherals.
This protocol was introduced to overcome the limitations caused by the parallel data exchange methods.
As you can see, it is large in size compared to the other connectors. The old version of RS232 had 25 pins. This was later reduced to 9 pins which are being used currently.
The cables under the RS232 protocol provide the necessary electrical connection for the terminals during data transfer. Thus RS232 terminals should not be connected with ordinary cables.
The 9-pin DB9 cables are used to connect with the RS232 standard.
Since the connection is between the DTE and DCE, the pins are assigned a 1:1 order. That means the Nth pin of DTE should be connected to the Nth pin of DCE. Thus, no crossover connection occurs in the RS232 protocol.
What is an RS232 to USB converter?
The RS232 ports are rarely seen in the devices available today. Most of them have USB ports now.
But RS-232 was largely used in the older systems and devices. Thus to establish an interface between the old device and the new one with a USB port, an RS232 to USB converter is required.
These are easily available in the electronics market as well as online.
RS232 to USB converters are also known as serial to USB converters or adapters. It converts serial data signals to USB signals. The main component in this adapter is a USB-to-UART chip like Cypress CY7C65213, FTDI FT232R, and Microchip MCP2200.
These converters do not require an external power adapter. The power is delivered from the USB port.
Different versions of USB serial adapters are available:
- 1-port adapter: It is the most commonly used adapter. It is used when only a single serial port is required.
- 2 to 4 port adapter: It is used when more than one serial port is required.
**Read more about RS232 on Wikipedia.