As many of you are no doubt aware, it’s not easy to find a modern consumer-grade computer today that would have a classic serial port. However, just because laptop makers stopped adding them doesn’t mean the legacy ports are no longer used nowadays. Being an essential part of medical and networking equipment, serial ports can still be found on a large number of old and new useful devices.
Let’s find out what is actually meant by a serial port communication and why so many people still rely on it these days.
What is RS232 communication?
Serial communication is a type of connection widely used in telecommunications. In serial communication, data is transferred one bit at a time in a sequential order over a computer bus or a communication channel. It is the simplest form of communication between a sender and a receiver. Because of the synchronization difficulties arising in parallel communication, serial connection is considered more efficient for long-distance communication.
Although the COM port is not the only communication interface supporting serial data transmission, as a rule, the term “serial port” refers to interfaces based on a common communication protocol RS-232.
RS-232 stands for Recommended Standard 232, a communication protocol that allows exchanging serial data between a computer and its peripheral devices. Generally speaking, the standard specifies common pin configuration, control signals, and voltage used for communication.
According to the EIA definition, RS232 is an interface serving for connecting data terminal equipment and data communication equipment.
DTE is short for data terminal equipment – a device used as a data source that allows converting user data into serial signals to send them over RS232 protocol to the DCE (data communication equipment). At the same time, the DTE can receive data from the DCE. The signals received from the DCE over the corresponding communication channel are reconverted by DTE. Data terminal equipment fits a male RS232 connector and performs a control function within RS232 communication.
DCE is short for data communication equipment – a communication line device (e.g. a modem, a switch, a hub, a converter) that serves for the transmission of conversion and enhancement of the signal generated by the DTE. The DCE comes with a female RS232 connector.
The process of data exchange between DTE and DCE devices is based on three main signals: Tx (transmission line), Rx (reception line) and GN (ground). For the communication to be successful the devices also use handshaking.
Handshaking is a method by which computers and other devices exchange status information. In the RS-232 standard, handshaking signals are used by one of the connected devices in order to inform the other one about its readiness to send or receive data. Hardware handshaking means that status signals are transmitted through special handshaking wires. Software handshaking means that the status information is transferred in special information bytes within the general data stream. The main aim of handshaking is to set the parameters of a communication channel before the actual data exchange starts.
Data transmission modes
A telecommunications network includes a wide range of hardware and software that participate in serial data exchange. The interactions between various parts of the network are based on some rules. The rules which specify the process of data transmission between two points of the network are referred to as a communication protocol (mode). Basically, there are two most common modes of serial data transfer: synchronous and asynchronous protocols.
Here’s how data is transmitted over the asynchronous protocol:
To begin the communication, a device sends a start bit (0). After this, the actual data bits (usually 8-bits) are transmitted. Then, the device sends a stop bit (1) which indicates that the data transfer is completed. In some cases, a parity bit may come before the stop bit. The parity bit was widely used in the past to check errors in the communication. Today, this bit is rarely used.
The synchronous protocol makes it possible for several data chunks to be sent and received within a certain time interval. To achieve this, the operation of both transceivers is synchronized at the beginning of the communication session. There are not start and stop bits in the synchronous protocol which means the data can be communicated faster.
Mechanisms of data transfer
When it comes to the asynchronous serial protocol, you can find a number of signaling mechanisms used to provide efficient data transmission free of errors. Such mechanisms include data bits, synchronization bits, parity bits, and baud rate.
It should be noted that the protocol is highly configurable. And serial communication is possible only if both devices on a serial bus are set to use the same data transfer protocol.
As you know, the standard size of a serial data package is 8-bit byte. However, the amount of data in different data packages may vary from 5 to 9 bits. For instance, if you are sending 7-bit ASCII characters, the optimal size for a data chunk is 7 bits.
The endianness of data is another important thing both devices need to agree on. Most-significant bit (msb) is usually sent last, unless stated otherwise.
Each data chunk is usually transmitted with two or three special bits serving for communication synchronization. The synchronization bits are the start bit and the stop bit. As their names indicate, these bits are used to signal the beginning and end of the message. Any data package can be sent with one start bit and one (or two) stop bits.
When data is sent over a serial link, parity can be used to detect errors in data transmission. To produce the parity bit, it’s required to count the number of bits in the data byte sent. Depending on the number of bits, the parity bit is set. The receiver also counts the number of bits received and then checks the parity bit. Considering that this error checking method slows down the communication, these days parity bit is a rather optional mechanism and not very widely used.
The baud rate represents the rate at which serial data is transported over a communication channel. The higher the baud rate, the more bits per second are transferred. To find out how long it takes to transmit a single bit, you just need to invert the baud rate.
Baud rate is usually expressed in bits-per-second and its standard value is 9600 bps. With that, data can be transferred at different baud rates. One thing you should keep in mind is that both devices taking part is a serial communication should use the same rate.
Modern implementation of RS232 technology
Reliable RS-232 communication technology is still commonly used by industrial control engineers, peripheral software developers, system integrators, quality control engineers, and many other specialists, working in the fields of industrial automation or surveying, metrology, aerospace manufacturing, medical care, etc.
Today, serial ports may be embedded on networking equipment such as switches and routers, reside on test benches, or internal modems. Computer technicians can use COM ports as a control console when diagnosing or configuring the equipment.
However, with current computers lacking serial ports it may be quite difficult to connect to the required serial port devices when it’s necessary. What’s more, one might need to access COM port devices remotely which seems even more challenging.
The best option in such situation is to use a serial communication software, designed specifically for these purposes. The dedicated software, Serial to Ethernet Connector, makes it possible to share serial port devices over the network. Even if your computer doesn’t have a real serial port, you’ll be able to connect to the required serial port device through a virtual COM port, created with the help of the app. That way, Serial to Ethernet Connector will allow you to exchange serial data with hundreds of devices physically located miles away.
Development of hardware and software solutions with serial interfaces often requires advanced tools for monitoring and analyzing COM port activity. To track and record all the data going through the monitored serial port, you can use Serial Port Communication, a professional system utility for RS-232/422/485 COM ports. The app is capable of capturing and displaying all the transmitted data in real time, which is very convenient when you develop an application, test or optimize serial drivers, or communicate with your serial port devices.