RS232 handshaking procedure

RS232 handshaking procedure

RS232 handshaking procedure. Exchanging signals of information between a sender and a recipient is called as handshaking. Handshaking is also called as flow control. It is the method of information transfer with few wires. These signals form a link between the transmitter and the receiver. with the best hardware handshake, you will have no problem managing the flow of data across all devices using a serial connection. In RS232, there are two types of handshakes. Hardware handshake and a software handshake.

Handshaking hardware

The flow control of data transfer and acceptance is done using a hardware shake. Uses control signals for DTR, DSR, RTS and CTS. Usually, when there’s a connection between computer codes and modem RTS and CTS is established, is used. this will stop the loss of data in buffer. to activate the handshake Signals are saved in high quality (logic ‘1’).

Software Handshake

This type of handshake uses two ASCII characters for initial communication. Therefore, this is known as software flow control. Software handshaking uses the XON / XOFF character to control serial communication. ‘XON’ represents Ctrl + S, and ‘XOFF’ represents Ctrl + Q. This handshake requires 3 strings. They are TXD, RXD and GND signal.

When the ‘XOFF’ character is enabled, the connection is closed until the ‘XON’ character is found by the sender. In some cases, the buffer can be overfilled which causes the recipient to automatically send ‘XOFF’ to the sender.
Working of RS232 handshaking

Successful data transfer on the RS232 link requires a handshake, i.e., control signals indicate that the data is ready to be sent and received on all devices.
There are many types of handshake lines, including:
RTS – Shipping Request
CTS – Clear sending
DTR – data terminal is ready


RS232 DB-25 pins

RS232 DB25 pins
RS232 DB25 pins

Since all the pins are not used for communication in PCs, so we have DB9 version available by IBM

RS232 DB9 version
RS232 DB9 version

What is the Null modem connection?

The null modem connection is shown in the figure below. This is the simplest connection between the transmitter and receiver.

null modem connection
null modem connection

What is handshaking procedure using RS232 standards?

The process of handshaking with RS232 involves four steps:
1. The (DTE) puts the RTS line in the “On” mode.
2. Data communication equipment (DCE) sets the CTS line to “On” mode.
3. DTE sets the DTR line to “On” mode.
4.The DTR line remains in the “On” mode while data is transferred.
After the data transfer is completed, DTE puts DTR and RTS lines in the “Off” region and DCE puts the CTS line in the “Off” mode.
With a handshake with RS232, RS232 communication will only take place when both RS232 links are ready, this will help in saving the signal. Therefore, the RS232 coupling process empowers DTE to request control of the communication link from the corresponding modem and allows the modem to notify the last devices that the detection has been detected.

RS232 handshaking signals
RS232 handshaking signals

Handshake lines also ensure that line receivers can cut data without errors. As a result, they enable you to enjoy effective RS232 communication and verification data that can be exchanged quickly and efficiently.
How data is transferred in RS232 Handshaking
Data is transferred consecutively to one side above the cables. Outgoing data is labeled Tx (indicating delivery) while incoming data is labeled Rx (indicating acceptance). To build a two-way communication system requires at least three wires Tx, Rx and GND (ground). Skipping Tx and Rx between the two systems allows each unit to speak the opposite.
Note: Each signal (TX and RX) requires a standard interpreter because high voltages are used to transmit data to cables (usually output from ± 5V to ± 25V).
Each byte can be transferred at any time (as long as the previous byte has been transferred). The transmission byte is not synchronized to the receiver – it is an asynchronous protocol e.g. no clock signal. For this reason, the software at each end of the communication interface must be set exactly the same so that each chip of the serial decoder can specify the serial data distribution.

transmission of a letter through RS232
transmission of a letter through RS232

Why we use Handshaking?

To send and receive data without data loss, it is necessary to maintain a strong connection between forwarding and receiving. To do that, a buffer is used. Buffer is a temporary storage
that allows the transmitter and receiver to store data until data is processed at a different speed.


In the diagram above, the transmitter and receiver have its own buffer. The transfer buffer catches characters to be sent to the receiver. While the recipient buffer contains the letters found in the sender. If the sender sends data at high speed, the recipient may fail to receive it. In this case, the letter ‘C’ misses the recipient. To avoid this, a handshake is used. A handshake allows the transfer and receiving device to sync before communication begins.

Purpose of RS232 Handshaking:

Handshake lines ensure that the computer will not transmit data if the receiving computer is not ready.
It is important to know that you can tie handshakes to fixed voltages. This ensures that the handshakes will remain stable.
In addition, the RS232 handshake is not always necessary. And even though your RS232 monitoring hardware may be equipped with inputs and effects that can be used for shaking hands, there is no guarantee that a handshake is needed to increase the value of your hardware.

Also read here

What is macro and how is it used?

Leave a Reply

Your email address will not be published. Required fields are marked *