Serial port communication, which uses Serial ports, was once a popular method of transmitting data. In Serial communication, a byte of data is sent and received one bit at a time through a serial port, over a single communication line. If you look on the back side of older computers, you may notice a D-shaped male connector with 9 or 25 pins. Well, if you can find that, then you are actually looking at a serial port. Serial ports also known as COM (communications) ports were extensively used earlier. Serial communication was popular because most computers had one or more serial ports. All you needed was a cable to connect the instrument to the computer or two computers together. If you are not familiar with computer hardware terms such as ports, input output devices, modem, and so on then Computer Essentials will give you ample knowledge on computer parts and terms. Serial ports have been around for decades, followed by Parallel ports for transmitting data between a computer and a peripheral or serial device such as a mouse, modem, a programmable instrument, or between two computers. But with the introduction of USB, FireWire, and other faster solutions in recent times, it’s more likely that both serial and parallel ports will be soon completely replaced by the USB ports.
Serial Port Details
The phrase “serial” implies that a serial port “serializes” data, which means it takes a byte of data and transmits serially each of the 8 bits of a byte one at a time. This is in contrast to a Parallel Port where all the 8 bits of a byte are transmitted in parallel, all at one time, over a cable with 8 wires. So a serial port needs only one wire to transmit the 8 bits. Serial port communication is useful when data transfer rates are low. Compared to a parallel port, the disadvantage of Serial port is that it takes 8 times longer to transmit the data, but the advantage is that cables used with a Serial port are cheaper and narrower. Serial ports are bi-directional. Bi-directional communication allows each device to receive data as well as transmit it. Serial devices use different pins to receive and transmit data. So this makes a serial port suitable for full-duplex communication, in which information can travel in both directions at once. Before starting transmission of each byte of data, a serial port sends a start bit, which is a single bit with a value of 0. After a byte of data is transmitted, it sends a stop bit to signal that the byte transmission is complete.
Pin Information of a Serial Port
DB9 connector is a typical Serial Port and below is a description of the signal and signal name against each pin of the connector. Pin 1 is the one on the top left and pin 9 is in the bottom right.
PIN SIGNAL NAME DESCRIPTION
1 Carrier Detect DCD Determines if the modem is connected to a working phone line.
2 Receive Data RxData Computer receives information sent from the modem.
3 Transmit Data TxData Computer sends information to the modem.
4 Data Terminal Ready DTR Computer tells modem that it is ready to talk.
5 Signal Ground Gnd Pin is grounded
6 Data Set Ready DSR Modem tells the computer that data is ready
7 Request To Send RTS Computer asks the modem if it can send information
8 Clear To Send CTS Modem tells the computer that it can send information
9 Ring Indicator RI Signal from computer acknowledging that a ring is detected
Applications of a Serial Port
Here are some of the hardware components that can be used with a serial port:
- Mouse – One of the most commonly used device used with serial ports, and specially used with computers that has no PS/2 or USB ports.
- Modem – Another commonly used device with serial ports. It was commonly used with older computers.
- Network – This was one of the original uses of a serial port, which allowed two computers to be connected for transfer of large files between them.
- Printer – Serial ports were frequently used earlier with older printers and plotters, but in present days they are not used so much.
Serial – A Common Communication Protocol
RS-232-based serial ports were mostly found on IBM-compatible PCs. They were used for several purposes, such as connecting a mouse, printer, or modem, as well as industrial instrumentation. The limitation of RS-232 is that it allows point-to-point connections between PC serial ports and devices and RS-232 hardware can be used for serial communication up to distances of 50 feet. RS232 is the communication line transmits data by using only three wire links, which are used for ‘transmit’, ‘receive’ and ‘common ground.’ To increase the number of devices RS-422 was invented, which was followed by RS-485 that increased the number of devices from 10 to 32. It is possible to create networks of devices which can be connected to a single RS-485 serial port. The noise immunity of RS-485 makes it a preferred choice for serial connection in industrial applications where several distributed devices need to be networked to a PC or other controller for data collection, HMI, or other operations. Modbus protocol is the most popular automation protocol in the field of process automation and SCADA. Modbus based networks run on RS485 serial communication standard.
Serial ports are used by computers to communicate easily with different types of hardware. Sometimes you need to program these ports so that data communication between your computer and sensors, field devices is a smooth process. You can interface to a serial port on the computer side by using Microsoft’s . net framework and object oriented programming such as C#, Visual Basic, or Visual C++. Though Serial Port communication is being widely replaced by USB, it is still widely used in industrial applications.