Cookie
Electronic Team, Inc. uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy. Click here to learn more.

Сomprehensive guide of serial port specification

Olga Weis Olga Weis

Along with the parallel port, the COM port, or serial port, is one of the traditional computer I/O interfaces which can still be found on POS systems, some medical equipment, lab instruments, and other old-timey hardware. Although in modern computers the COM port is of limited use, information about it may be useful to many users.

Contents


  1. What is a serial port?
  2. What is a virtual COM port?
  3. Serial port vs parallel port
  4. What is a COM port used for?
  5. COM port parameters
  6. What are the advantages of serial data transmission?
  7. Types of serial ports
  8. RS232 Standard. Serial port pinout.
  9. Types of serial connectors
  10. How to test COM ports on a computer

What is a serial port?


Serial Port

A COM port is a bidirectional serial interface that allows sending and receiving data bit by bit.

The serial port appeared long before personal computers of the IBM architecture were introduced. On first machines, the COM port was used for connecting peripheral devices. However, its scope of application was somewhat different from that of the parallel port. If the parallel port was mainly used to connect printers, the COM port (by the way, COM is short for communication) usually worked with telecommunication devices such as modems. However, a serial mouse as well as other peripheral devices can also interact with a computer via a serial interface.

Today serial port communications are not that common as they once were. A COM port has been replaced by USB - a more modern method which does not require special knowledge for implementation. However, modern standards of compatibility between serial equipment and its controlling software have been formed for quite some time around the concept of COM ports which are now seen as archaic.

This is due to the fact that initially almost any equipment, including GPS receivers, was external, and its connection to the computer was established via a serial cable attached to one of the PC’s hardware ports. In order to set up serial communication, a user needed to specify a correct port number and the speed of data transmission.

Now most modern computers are equipped with USB ports instead of COM interfaces. What’s more, GPS receivers have increasingly been installed inside of devices, meaning the cable connection is no longer efficient.

What is a virtual COM port?


A virtual serial port is a special software package that emulates a physical COM interface in software, which allows you to add serial ports to your PC without using additional physical hardware like expansion cards, etc. A virtual COM port is a solution if there’s a lack of real serial ports in your system.

Virtual Serial Port

Now, thanks to some dedicated software (e.g. Virtual Serial Port Driver, Virtual Serial Over Ethernet, etc.), a remote serial device can be emulated on your local PC in such a way that you can communicate with it as though it were connected directly to your machine.

In this case, remote serial peripherals are accessed via a virtual COM port created in your local system by a specialized app. And all serial apps communicating with a remote peripheral over a virtual serial port recognize the interface as a hardware one.

This makes it possible to ensure compatibility between legacy serial software and modern equipment.

As for the way you manage your COM ports, it does not change significantly. Users still have to make the port configurations as they would do with a physical serial port. However, a modern COM port is no longer a bulky interface located on the back panel of the system unit but a completely software solution.

Serial port vs parallel port


Serial and parallel interfaces are two different types of computer ports. In contrast to a parallel (LPT) port, a serial port transmits data bit by bit over a single line rather than several lines at a time. The sequences of bits are grouped into data series beginning with a start bit and ending with a stop bit. Hence, the name “serial port”.

Serial port vs parallel port

A serial port has two lines through which the actual data is transmitted. They are the lines for transferring data from the terminal (PC) to the communication device and back. In addition, there are several control lines. To function properly, serial ports rely on a special controller chip, the Universal Asynchronous Receiver/Transmitter (UART) which supports a relatively high data transfer rate, reaching 115,000 baud (bit/s). (However, it is worth noting that the actual data transfer speed depends on the characteristics of both communication devices). In addition, the UART controller converts parallel code into serial and vice versa.

Serial ports use electrical signals of relatively high voltage: up to +15 V and -15 V. The logical zero level of a serial port is +12 V, and the logical one is -12 V. Such a large voltage drop ensures a high noise immunity. On the other hand, high voltages used by serial ports require complex circuit solutions.

Where serial ports are used


As we already know, the scope of use of a COM port has been reduced due to the introduction of a faster and more compact, and, by the way, also serial, USB interface. External modems designed for connection to a COM port, as well as COM-mice, are almost out of use. And rarely anyone will connect two computers with a null modem cable.

However, a big number of specialized devices including various barcode scanners, surveillance cameras, industrial equipment still rely on a serial port to connect to the computer. You can also find COM interfaces on many motherboards. So with a large number of affordable hardware and software solutions developed for it, the RS232 protocol is here to stay. Compared to USB, a COM port has an important advantage - the RS-232 standard 9600bps port will drive 15 meters of shielded cable, while the length of a USB cable is usually limited to 5 meters.

The main parameters of COM ports


A COM port has the following standard features:

  • The base I/O port address;
  • IRQ (interrupt) number;
  • The size of one block of information;
  • The data transfer rate;
  • Parity detection mode;
  • Method of flow control;
  • The number of stop bits.

What are the advantages of serial data transmission?


  • Serial communication requires less number of conducting wires, hence reduces the cost of the interface.
  • It supports long distance data transmission.
  • It uses less number of wires often only one, this leads to simple interface between transmitting and receiving devices or ICs.
  • Serial protocols are easy to implement.

Types of serial ports


There are several types of data communication interfaces, each of which is designed for specific applications based on the required set of parameters and protocol structure. Serial data interfaces include CAN, RS-232, RS-485, RS-422, I2C, I2S, LIN, SPI, and SMBus, but RS-232, RS-485 and RS-422 are still the most reliable and common ones.

Interfaces RS-232 RS-422 RS-485
Number of devices 1 Transmitter
1 Receiver
5 Transmitters
10 Receivers for 1 Transmitter
32 Transmitters
32 Receivers
Protocol type duplex duplex half duplex
Max cable length ~ 15.25 meters at 19.2 Kbps ~ 1220 meters at 100 Kbps ~ 1220 meters at 100 Kbps
Max data transfer speed 19.2Kbps for 15 meters 10Mbps for 15 meters 10Mbps for 15 meters
Signal unbalanced balanced balanced
Min input voltage +/- 3V 0.2V differential 0.2V differential
Output current 500mA 150mА 250mА

RS232 Standard. Serial port pinout


RS-232 is a standard communication protocol used by serial ports for linking a computer and its peripheral. This standard describes the process of exchanging data between a telecommunications device, such as a modem and a computer terminal. The RS-232 standard defines the electrical characteristics of signals, their purpose, duration, as well as the size of connectors and their pinout.

It should also be noted that the RS-232 standard is the protocol of the physical level and it does not define the transport protocols which will be used for data transmission. The transport protocols may vary depending on the communication equipment and software used.

Types of serial connectors in a computer.


Most computers where you can still find a serial port have a 9-pin DB-9 male connector. The DB-9 connector is usually located on the PC's motherboard, although in older computers it can be on a special multi-card inserted into the expansion slot. The older version of a serial connector is 25-pin DB-25.

In contrast to the parallel port, the connectors on both sides of a serial cable are identical. In addition to the data transmission lines, a serial port contains several service lines through which some control information can be transmitted between the terminal (computer) and the telecommunications device (modem). Although, theoretically, only three lines are enough for a serial port to work: Receive Data, Transmit Data and Ground, the practice has shown that the presence of the service lines makes communication more efficient, reliable, and faster.

The pinout of DB9 connector according to RS-232 standard and its correspondence to DB-25 connector pins:

DB-9 Pin number Signal Description DB-25 Pin number
1 (DCD) Data Carrier Detect 8
2 (TxD) Transmitted Data 2
3 (RxD) Receive Data 3
4 (DTR) Data Terminal Ready 20
5 (Gnd) Ground 7
6 (DSR) Data Set Ready 6
7 (RTS) Request To Send 4
8 (CTS) Clear To Send 5
9 (RI) Ring Indicator 22
Serial Port Signals and Pin Assignments

GND - Ground, the second (common) wire for all signals. (Signals are always transmitted via two wires).

TxD - Transmitted Data, an asynchronous channel for sending serial data.

RxD - Received Data, an asynchronous channel for receiving serial data.

RTS- Request To Send, a control signal that says that the computer has data to send over the TxD channel to the end device.

DTR - Data Terminal Ready, a control signal that says that the computer (terminal) is ready to communicate with the end device.

CTS - Clear To Send, a control signal which indicates that the end device is ready to receive data from the terminal via the TxD channel. Usually, this signal is set by the end device after it receives the signal RTS=True (transfer request) from the computer and is ready to receive data. If the end device does not set the CTS=True signal, the transmission over the TxD channel will not start. This signal is used for hardware flow control.

DSR - Data Set Ready, a control signal which says that the end device has completed all the settings and is ready to start sending and receiving data from the computer.

DCD - Data Carrier Detected, a control signal that informs the computer (terminal) about the detection of another terminal, that is, the end device, for example a modem, has detected another modem that wants to initialize data exchange between the terminals. The modem sets a DCD=True signal, which is detected at the input of the computer (terminal). If the terminal is ready for data exchange, it should indicate its readiness by setting a DTR=True signal, after which the data exchange between the two terminals will begin.

RI - Ring Indicator, a signal that “tells” the computer (terminal) that the end device is receiving a call signal.

How to test COM port on a computer


There’s often the need to open a COM port when you’re repairing a computer or performing diagnostics. Also, it may be necessary to check whether your serial port is working. To burn an element is very simple. Most often COM ports get damaged when users disconnect devices incorrectly.

The simplest way to check the operability of a COM interface is to connect a mouse to it. However, this will not give you a complete picture, since the manipulator uses only half of the eight signal lines available. Only by using a dedicated COM port sniffer software (e.g. Serial Port Monitor) you’ll get the ability to thoroughly test a serial port. Find the list of Best serial data sniffers in our new guide. It covers both software and hardware COM port sniffer solutions and highlight the clear benefits you get with one or another solution.

Conclusion


Currently, the serial port is not a widely used means for information input/output. However, since there is a large number of COM-based devices, first of all, telecommunications equipment, and thanks to some advantages of the RS-232 serial data transfer protocol, the serial interface is still going strong in many spheres of people's lives.

small logo Virtual Serial Port Driver
#1 at Communication Application
Virtual Serial Port Driver
Create virtual COM port pairs in Windows
5 rank based on 367+ users ( Learn more )
Get a download link for your desktop
Submit your email address to get a link for quick download on your desktop and get started!
or