Serial Ports
What is a serial port?

Serial ports were used to connect, mostly, modems. Modems, which stand for, modulate demodulate, is a device that one used to connect to the internet via standard telephone lines.

It's hardly used these days.

The basics

The name, serial, means that data is transferred in a serial manner, bit by bit, from one device to the other.

For this to happen a standard was created called RS-232 (Recommended Standard 232). It was developed in the late 1960's, early 1970's and is still used today.

RS-232 is not the only standard. There are other standards like RS-422 and RS-423 that have been adopted by other vendors, but the RS-232 is the most widely used.

Modems were used to connect you to the internet over a telephone line and serial communications were ideal for this.

Modems converted the analog signal of the telephone to digital signals that computers can understand.

Remember, computers only understand 1's and 0's or on and off. Telephone lines uses analog communications like voice. Computers don't understand voice only 1's and 0's.

But that's not that these ports were used for. Devices called "dumb terminals" were also used to connect users to a computer. The word "dumb terminal" was used cause the device had no CPU or memory. All it did was display the data bit by bit on a terminal.

These displays had green or white fonts with a dull black background. But in those days, this was the only method to get data into the computer.

How fast is a serial port?

Serial devices are quite slow. The speed of serial ports are defined as a bit rate or baud. Some devices or terminals used 9600 baud or a bit rate of 9600 bits per second. That equates to about 9 kilobytes per second.

Serial communications can range anything from 75 bits/s to 128000 bits per second. It depends on the device that is connected.

There is a formula that the designers use to calculate the baud rate or bit rate. I don't want to complicate things here but do a search on this topic if you want in depth knowledge on this subject.

Is serial ports used at all?

With the development of USB, serial communication is almost not used at all.

If you want to connect to the internet you would use a USB modem or connect through your network port to the internet via routers.

Serial communications is ideal for slower devices like older modems and terminals.

I use my serial port on my laptop just about everyday. I'm an hardware engineer and sometimes using serial communication is the only place where I can get in depth diagnostics information.

I also use serial communications to setup devices and servers and to upgrade firmware. Manufacturers still include it in their hardware design cause it's cheap and easy to make and the standard has been around for years.

Manufacturers of switches, like Cisco or 3Com, will include a serial port so the device can be setup out of the box.

Other uses include, Global Positioning System (GPS), UPS (Uninterpretable power supply) and test and measuring equipment.

Below is a picture of my GPS that I used. The cable next to it is a serial cable that I connected to my GPS to input co-ordinates.

GPS receiver with serial cable

These are specialized equipment which you will probably never use. Just know that there are still application for serial communications.

How do I connect a serial device?

Using serial communications is fairly straight forward. There are a couple of things you have to keep in mind.

You need to find out at what bit rate the device you are connecting to is operating at. Is it 9600, 38400 etc. This is important, if you get this wrong, then all you will see is garbled output. The device you are connecting from and the device you are connecting to, must use the same bit or baud rate.

You can set this rate in the utility that you use. Windows XP has a application called hyper terminal.

You can also download serial utilities from the net. One example is a application called, putty. It's freely available and is, well, free.

Some operating systems have utilities built in like UNIX or Linux operating systems. In Solaris, for instance, they use a program called tip to connect serially.

Another important factor is the cable. The device you want to connect to usually ships with the correct cable. So all you do is plug the cable to the PC serial port and then in the device serial port, set the baud, and connect.

You can find the baud rate in the documentation of the device.

The most common types of cables that you get to connect serial devices are called RS232 DB9, RS232 DB25 and RS232 RJ45. RS232 is the standard, DB is D-sub and the number at the end reflects the number of pins.

So, DB9 means there is 9 pins and DB25, 25 pins. RJ45 is actually a network cable.

More and more vendors are using the RJ45 connector type on their equipment. On the device end you will have a RJ45, and on the end that connects to the PC, you will find a DB9 or DB25. There are also converters that will convert RJ45 to DB9 or DB25.

If you want to connect to system together, like PC's then you would use a cable called a null modem cable. In serial communications, data is transmitted on pin 3 and received on pin 2.

If you connect to devices such as modems, then this pin out is fine. If you want to connect to another system, then you need to cross pins 2 and 3.

The reason we cross pins 2 and 3 is that both systems uses pins 2 and 3 for receiving and sending data. If I don't cross the pins then the one system will send on pin 3 and the other system will also send on pin 3. Where are they going to receive the data from?

By crossing the pins, one system will send on pin 3 and the other will receive on pin 2.

There is also a third wire called the ground wire. In a null modem cable DB25, the ground wire is connected to pin 7. On a DB9 it's connected to pin 5.

You basically only need these 3 ping connected in order to use a null modem cable between 2 systems such as PC's.

Here is the pin layouts of RS232 DB25.

RS232 DB25 pin layout
RS232 DB25

RS232 DB25 Pins

Here is the pin layouts of RS232 DB9.

RS232 DB9 pin layout
RS232 DB9

RS232 DB9 Pins

In windows the serial port is called the COM port. Just make sure you use the correct one.

There are other setting as well, such as parity, stop bits etc. But only fiddle with these if you cannot connect just changing the bit rate. Read the manual!

This is all great, but what does the ports look like?

There are several different types of connectors for serial ports. The most common is the DB9 and DB25 ports. Below is a picture of these two.

DB9 and DB25 ports

As you can see from the picture, serial connectors can be either, male or female. This can be confusing at times when connecting cables. On the system side, you might have a male and on the device you want to connect, a female.

If you look at the DB25 connector it looks like a parallel port. A lot of people have confused this port with a parallel port. They then connect a printer to the serial port and nothing happens.

To avoid confusion, the printer port has a little printer icon or picture on top of it and the serial port have the binary icon, 1010, on top of it.

Just look for these icons before connecting printers or serial devices to the ports.

When connecting two system together, they both will have male. Keep this in mind when connecting devices via serial.

Some systems still ship with a serial port. But few people use it. If you want to use serial communications and you don't have a serial port, then get yourself a USB to serial converter.

These are cheap and easy to get.

USB to serial converter
USB to serial

Serial communications have caused some people headaches and I think that's why it's not so widely used anymore. If you read through this section and are feeling lost, don't worry, you're not alone.

If you do a bit more research on serial communication, you will notice that it's quite a broad subject. There are lots of standards and sub standards of the standards and connectors and speeds and what not.

You, as a PC user, will probably never use the serial port.

I also sometimes struggle with serial ports, but over the years I have gotten used to all it's little tricks and troubles.

Return from Serial Ports to Computer Ports

Back to What is My Computer


What is my Computer

What is in my computer?

Computer Components

Discover what goes into a PC?