How a serial port works
A serial port is an interface that transmits data one bit after another over a single signal line in each direction. Inside the computer, a chip called a UART (universal asynchronous receiver-transmitter) turns each byte into a stream of bits framed by a start bit and a stop bit, and the receiving UART rebuilds the bytes at the other end.
Both ends must agree on the speed and the frame format. The usual description is a string such as 9600 8N1: 9,600 baud, eight data bits, no parity bit and one stop bit. Optional flow control, either hardware (RTS/CTS lines) or software (XON/XOFF characters), stops the sender when the receiver’s buffer is full.
The serial port is the opposite of the parallel port, which sends eight bits at once over eight wires. Parallel was faster over short printer cables, but serial needs fewer wires, runs further and is simpler to isolate, which is why it outlasted parallel in industry.
What is a COM port?
A COM port, short for communications port, is the name the operating system gives a serial port. Windows numbers them COM1, COM2 and so on, and Device Manager lists each one under Ports (COM and LPT). Linux names on-board ports /dev/ttyS0, /dev/ttyS1 and USB adapters /dev/ttyUSB0. The terms are used interchangeably: the serial port is the hardware, and the COM port is how software addresses it.
A USB-to-serial adapter creates a virtual COM port, so older software can still talk to it. Adapters work well for occasional use, but on a production machine a native port avoids driver changes and COM numbers that move when the adapter is plugged into a different USB socket.
The names date from the original IBM PC, which gave the first serial ports fixed resources: COM1 at I/O address 3F8h on interrupt 4 and COM2 at 2F8h on interrupt 3, with COM3 and COM4 at 3E8h and 2E8h sharing those interrupts. Windows now numbers ports from COM1 up to COM256 and remembers each device it has seen, so a computer that has had many adapters plugged in can end up with numbers such as COM17. Older software often opens only COM1 to COM4, and the usual fix is to change the number in Device Manager, under the port’s Port Settings and Advanced options.
Not every COM port is a physical socket. As well as USB adapters, drivers create virtual COM ports for Bluetooth serial links, for modems and GNSS modules that present a serial interface, and for serial-over-network software that maps a remote serial device to a local COM number. Software sees them all the same way, but buffering and handshake lines can behave differently from a native UART, which matters for protocols that depend on exact gaps between characters, such as Modbus RTU.
Types of serial port
Serial ports differ in their electrical standard rather than the way data is framed. The same UART can drive any of them through a different transceiver, and many industrial boards let you select the mode per port in the BIOS or with jumpers.
| Interface | Signaling | Devices per link | Typical distance | Typical use |
|---|---|---|---|---|
| RS-232 | Single-ended, ± voltage | 1 to 1 | Up to around 15 m | PC COM ports, instruments, scanners, consoles |
| RS-422 | Differential pair | 1 driver, up to 10 receivers | Up to around 1,200 m | Long point-to-point links, displays |
| RS-485 | Differential pair | Multi-drop, typically 32 standard loads | Up to around 1,200 m | Modbus RTU, building and factory networks |
| TTL UART | 3.3 V or 5 V logic | 1 to 1 | Board level, centimeters | Debug headers, modules, sensors |
Distances fall as speed rises, so the longest runs assume lower baud rates. Our guide to RS-232 signals and pinouts covers the PC standard, and how RS-485 multi-drop networks work explains the industrial bus.
Why industrial computers keep serial ports
Consumer PCs dropped serial ports years ago, but factory, transport and utility equipment still depends on them. Serial is simple, deterministic and supported by almost every controller made in the past 40 years.
-
//
PLCs and drives. Many PLCs, inverters and meters talk Modbus RTU over RS-485, so the computer needs a native port and termination.
-
//
Instruments and scales. Weighing scales, analyzers, barcode scanners and receipt printers commonly use RS-232.
-
//
GNSS and marine data. GPS receivers and marine electronics send NMEA 0183 sentences over serial, often at 4,800 or 38,400 baud.
-
//
Console access. Switches, routers and embedded boards provide a serial console for configuration and recovery when the network is down.
-
//
Port count. Embedded box PCs commonly carry two to six COM ports, and serial I/O modules add four or eight more, with opto-isolation for noisy sites.
Specifying an industrial serial port
The port count is only the start. On a long-life installation, the details below decide whether serial links stay reliable.
- Mode per port. Check which ports are RS-232 only and which can switch to RS-422 or RS-485.
- Isolation. Optical or magnetic isolation, typically rated in kilovolts, stops ground loops and surges between buildings or machines damaging the computer.
- Termination and biasing. RS-485 buses need a termination resistor at each end and bias resistors to hold the line in a known state.
- Power on pin 9. Some industrial boards can supply 5 V or 12 V on pin 9 to power a scanner or touch controller, set in the BIOS.
- Connector. DE-9 is standard, but terminal blocks suit RS-485 wiring in a cabinet.
- Speed. Check the highest baud rate each port supports if a device needs more than 115,200 baud, as some industrial ports run at 921,600 baud or faster.
Quick answers on serial ports
Serial and COM ports: common questions
What is a serial port used for?
Connecting controllers, instruments and consoles. Typical devices are PLCs, meters, scales, barcode scanners, GPS receivers, modems and the configuration console on network equipment.
What does a serial port look like?
Usually a nine-pin D-shaped connector. On a PC the COM port is a male DE-9, often called DB9, with two rows of five and four pins and two jackscrew posts.
How do I find which COM port a device is on?
Check Device Manager in Windows. Expand Ports (COM and LPT) and plug the device in to see which entry appears. On Linux, list /dev/ttyS* and /dev/ttyUSB* or check the kernel log.
Is USB a serial port?
USB is a serial bus, but not a serial port. It also sends data bit by bit, but uses its own protocol and host controller. A USB adapter can present an RS-232 port to software as a virtual COM port.
What is a null modem cable?
A crossed RS-232 cable. It swaps the transmit and receive lines, and usually the handshake lines, so two computers or two DTE devices can talk directly.
What is COM1?
The first serial port. COM1 is the name Windows gives the first serial port, traditionally the on-board RS-232 port at I/O address 3F8h. Adapters and add-in cards take the next free numbers.
We configure every COM port on the industrial computers we supply as standard, setting the RS-232, RS-422 or RS-485 mode, termination and pin 9 power to suit the devices on site. Send us your device list and we will specify the ports to match.