Tutorials

Serial port - what is it, what is it for and types

Table of contents:

Anonim

The serial port is currently one of the main forms of communication between external devices and computers today. An interface that we can find in absolutely all the peripherals that we have on our desktop, as well as inside our equipment.

Index of contents

We will try to explain the operation of the serial port, as well as the main interfaces that we currently find. And if you do not know what the differences are with the parallel port, we will also spend time differentiating them.

What is a serial port

If you take a look at the cables that you have right now on the desk that connect the keyboard mouse or USB flash drive to your computer, you will be seeing serial communication interfaces.

The serial port is a digital data communication interface in which information is transmitted sequentially bit by bit by conductors. In this way a serial port should send all the information in one bit after another, while a parallel port would send several bits simultaneously. The serial data interface or serial port works under the RS-232 standard.

So do you think a serial port is slower than a parallel one? Well nowadays we have much faster serial ports. Although of course, these do not necessarily conform to the commented standard, but are improved versions that completely render the native serial port obsolete. Being the easiest to implement, with better compatibility and infinitely more widespread.

Serial port and hardware operation

This port works asynchronously, thanks to a protocol that initiates transmission with a " start " signal that prepares the receiver to receive the word (bits). After sending this word, which will be an ASCII code for each character, a “ stop ” signal is sent so that the receiver rests after encoding the word and waits to receive another.

We have three types of serial communication:

  • Simplex: Transmission is unidirectional, that is, there is a single sender and a single receiver, for example, in broadcast communications. Duplex: Each end can be a transmitter and receiver simultaneously, so different cables are used to send and receive, or waves with different frequencies are used to avoid mixing. Semi-duplex: It is similar to duplex transmission, but when one transmits the other listens, for example, to two walki talkies.

In this way, we must understand that in a communication with a serial port, both devices must have an input and an output, so the devices are divided into the DTE (Data Terminal Equipment) and DCE (Data Circuit Termination Equipment) categories.. So a computer would be for a DTE while the DCE would be the modem or programmable card. To connect two DTEs or two DCEs a null bridge should be used to cross both signals.

To manage the communication interface we have a UART or USART chip (Universal Asynchronous Transmitter and Receiver). Its function is to convert the signals and voltages of the CPU to the communication standard. The UART 8250 chip is used for 8 and 16 bit processors, while the UART 16550 is used for the rest from IBM computers.

RS-232 and Pinout serial port

RS-232

In the history of computing, the most widely used port has been the one that transmits serial data. Its interface was standardized in 1962 thanks to the EIA / TIA RS-232C standard, for friends, RS-232 or "Recommended Standard 232". In turn, the recommendation V.24 was created, which defines the circuits and signals of the interface, and the recommendation V.28, which defines the electrical aspects.

The most widespread connector was the DB-25, later simplified to DB-9, directly called RS-232. It is important not to confuse this connector with the parallel port of the same name, although it is called D-Sub. It was (and is) focused on its use in connections between computers and external devices with duplex connections. For example, a modem, switches and other industrial automation communication devices such as programmable boards, robots and other general consumer products such as digital washing machines.

Next, we will see the pin configuration of the RS-232 port in its version DB-9 and DB-25. In both cases we have the same number of useful pins.

Current uses of the serial port

Our current desktop computers no longer have the RS-232 port implemented, since USB is the most current interface and is practically compatible with all types of electronic PCBs. But we can still find this PCI serial port through an expansion card if we dedicate ourselves to programming. Also there are many RS-232 to USB adapters.

These are the fundamental uses of the DB-9 or RS-232 port today

  • Modems, switches, routers, satellite telephones or load balancers: we still find this type of ports or headers internally or externally to modify the microcode of older network equipment and not user-manageable. Infrared barcode readers: and other relatively old supermarket equipment. Programmable boards, electrical measurement equipment and software scrubbers. Printers: older printers that do not use a USB interface or parallel connector, generally computers that do not have a USB to update their firmware.

Above all, we are talking about industrial and network devices, where use is expected by users with technical knowledge.

Serial port speed (RS-232)

Before looking at the current versions of the serial port, it is worth knowing a bit about the speeds that this has reached after hardware and peripheral updates:

These speeds are measured in bits per second or baud, a common measure in modems, and are quite low compared to the serial ports that we currently have as USB. Also being directly managed by software in terms of bandwidth and connection to the peripheral.

The evolution of the serial port to the present time and main interfaces

We leave the RS-232 port behind to learn more about the most used serial ports today. All of them work under their own standard and not under RS-232 conditions, being managed automatically and autonomously by their own controller.

PS / 2

This port was first implemented on IBM PCs in 1987 and even today we find it on current boards. Its function is to connect mice or keyboards in an independent interface to the USB. It has a total of 6 pins being circular and in the operating system we can find it as a COM port.

It is a bidirectional interface, and on the old boards with RS-232 port it shared interruption with this port. In addition, it does not allow hot swapping, so the computer would have to be restarted to detect the installed peripheral again.

USB (Universal Serial Bus)

Who does not know today the USB port? We could dedicate an entire article to this interface and we would not finish. It is the most widely used serial port today to connect peripherals of all kinds to a computer.

Its interface is enough with 4 conductors of which one supplies voltage at 5V, two of them are in charge of data upload and download and the last one is the ground connection. While other versions such as micro USB have a 5th pin to distinguish it from Micro-A and Micro-B. Also later versions USB 3.0 onwards increase their pinout to allow more bandwidth.

These are the versions and speeds that we currently have leaving version 1.0 and 1.1 behind:

  • USB 2.0: theoretical speed of 480 Mbps (60 MB / s) with a power supply capacity of 5V. USB 3.0: Increases speed up to 5 Gbps (600 MB / s), and is also called USB 3.1 Gen1 or USB 3.2 Gen1. USB 3.1: Although it is currently called USB 3.1 Gen2 or USB 3.2 Gen2, this is how it has been established in 2019. It increases its speed to 10 Gbps (1.2 GB / s) USB 3.2: It increases speed to 20 Gbps (2.4 GB / s) and we will find it with the denomination USB 3.2 Gen2x2. This port was implemented in late 2019 on new Intel and AMD boards.

And since 2014 we have available the USB Type-C port, which has 24 contacts arranged in two rows to be completely reversible. This type of connector is widely used for portable devices such as Smartphone or peripherals. Currently we can find USB-C type 3.2 Gen1, 3.2 Gen2 and 3.2 Gen2x2. In addition, it is capable of implementing DisplayPort 1.4 and Thunderbolt 3 connection with a load of up to 100W.

Firewire

Also known as its IEEE 1394 standard, it is the American version of USB before the interface itself also extended in this area, leaving this serial interface far behind in performance.

It is a connector similar to USB, although with a pointed corner and having 4, 6, 9 and up to 12 pins depending on version . Currently it has been completely replaced by USB 2.0 onwards.

There are 4 versions of Firewire according to their bandwidth, being

  • Firewire 400: works at 50 MB / s Firewire 800: reaches 100 MB / s Firewire s1600: speed of 200 MB / s Firewire s3200: latest version working at 400 MB / s

Video ports

The video ports also work under a serial type bus, these are the D-Sub, also known as VGA, the DVI in its different versions and the HDMI and DisplayPort ports as the most current interfaces and used together with Thunderbolt under USB Type- C.

The fastest will be the HDMI port and the DisplayPort. In the first case we are in version 2.0b with a bandwidth of 14.4 Gbps, and soon we will move to version 2.1 which increases to 42.6 Gbps supporting resolutions of up to 8K at 120 Hz. And in the case of DisplayPort we have operating version 1.4 at 49.65 Gbps supporting 8K resolutions at 60 Hz.

SATA and PCIe interface

And finally the most important interfaces of our computer: SATA (Serial Advanced Technology Attachment) for hard drives, and PCIe or PCI-E (Peripheral Component Interconnect - Express) for internal communication of components.

SATA is the interface that replaced PATA for connections of storage devices in general consumption computers. Its maximum bandwidth in the SATA III version is 6 Gbps, which has been approximately 600 MB / s. It uses a much smaller connector than the IDE and with a single device connection per interface, also allowing hot plugging. It works using the AHCI (Advanced Host Controller Interface) protocol, and is also available on M.2 interfaces for solid state drives.

PCI-Express is the quintessential board internal serial bus, which allows us to connect high-speed components directly into slots installed on the motherboard. We will call these expansion cards. Currently we find boards with PCI-Express in its version 4.0, in which each of the data lanes have a bandwidth of 2000 MB / s (16 Gbps) up and down simultaneously, a real barbarity compared to the ports external. They connect NVMe SSDs, graphics cards, network cards, etc. In addition, the north bridge or chipset communicates with the CPU by a bus of this type.

Differences between serial port and parallel port

We have yet to see the main or the main difference between the serial port and the parallel port. This lies in its operation, since a parallel port sends the bits of information at the same time and in the form of packets. Each of these bits, which can be for example an ASCII code is sent by a different conductor, having then as many conductors as bits are sent at the same time. In addition to these there will also be other extra conductors for timing, ground and other signals.

Parallel ports are for example the Centronics type for printers, the PATA bus (IDE) for hard drives and the SCSI bus also for hard drives. In them, hot connection is not allowed, nor is the power of the connected peripheral. They support far fewer peripherals connected to the same bus, and are currently largely deprecated.

Conclusions and links of interest

The serial port in its RS-232 standard and later versions has only been left for purely industrial and sporadic use with consumer computing equipment. A port that undoubtedly marked a before and after in the connections of equipment and peripherals, especially in networks to update the firmware of modems.

Currently we all use USB in its different versions since it is a much smaller port and much higher speed. In addition, it supports hot connections (Plug And Play) and even power supply of up to 100W in the Thunderbolt 3 interface under USB Type-C capable of reaching up to 40 Gbps.

If you want to know more about ports or networks, we leave you with these articles:

Did you know the RS-232 port, have you ever used it? If you know more series posts or have any questions, you can leave them in the comments.

Tutorials

Editor's choice

Back to top button