Why do some serial interfaces have many pins?

5

Various hardware connectors that are dubbed "serial", e.g. USB and PCI-express, have many more than 2 pins/wires. In fact even the good old "serial port" has them.

But since they are serial, not parallel, one would think that they don't need so many. What are the extra wires used for, if not parallel communication channels?

Bart van Heukelom

Posted 2013-01-02T15:08:03.943

Reputation: 1 958

Are you asking what the pins are for? In some cases anything, depending on the engineer, some times grounding, some are switch detection (in cases like SIM connectors) – Dave – 2013-01-02T15:13:05.477

@DaveRook Well, yes, although I'm in a general state of confusion here and the question sort of is, "enlighten me" :P I can understand some extra pins for 'supporting' tasks, but e.g. PCI-express has dozens of them. – Bart van Heukelom – 2013-01-02T15:14:39.490

1Because the data being sent is sent one after another not in parallel with one another. This is an easily researched topic. – Ramhound – 2013-01-02T15:16:44.373

1I think your understanding of serial and parallel may not be totally correct! Just because more than 1 connection exists doesn't mean the same job is done over all the connections. Only when 1 job is split does it class as parallel. Other than that, it's just multiple serialised tasks at the same time. – Dave – 2013-01-02T15:19:48.580

1@Ramhound I understand that's the meaning of "serial", but then what are the other pins for? Dave Rook's last comments makes it clear. – Bart van Heukelom – 2013-01-02T15:25:59.940

@BartvanHeukelom - well, technically, it's up to the engineer, but as per my first comment, they can be used for things like switches/grounding etc. Some times, it has an 'in' and an 'out' as well. For SIM, the connection may be to and from a phone's OS, the others to the RF for a signal etc... So, regardless of device, it could be many things. – Dave – 2013-01-02T15:32:05.470

@BartvanHeukelom - Ramhound's comments are perfectly correct, it's just explained differently to how I did :) – Dave – 2013-01-02T15:49:22.697

@DaveRook Ramhound implied I could easily have Google the meaning of serial, but that was not the question, I already knew the meaning. What I didn't know is why this was applied to many-pin connections. – Bart van Heukelom – 2013-01-02T15:50:50.200

@BartvanHeukelom - You were asking what the other pins were used for. That would depend on the serial standard being used. I attempted to highlight a single difference between serial and parallel connections. Since you brought up USB it seems you really don't know how serial connections work. – Ramhound – 2013-01-02T16:38:55.743

@Ramhound I may not have known how specific implementations of serial connections work, but "data being sent is sent one after another not in parallel with one another" was well known to me ;) (or I should've been ashamed) – Bart van Heukelom – 2013-01-02T17:12:43.393

Answers

9

The original serial had 3, 5 or even 7 pins, but only one to carry the data.

The three pins serial worked like this:

enter image description here

The extra pin for a common ground is needed so that the other computer knows what to compare the data signal with. The receive and transmit lines are crossed, so that data transmitted by computer 1 is received on the receive pin in computer 2.

If you want you might call this two serial lines.

The 5 and 7 pins versions of the serial cables added extra signalling, allowing to signal when they where ready to receive data, or when they where busy (if busy, any data sent might be lost since the receiver had no time for it).


USB (versions 1 and 2) have multiple cables, but only one pair to carry the data signal. Hence it is a serial connection.

Look at this picture (courtesy of Wikipedia). You will notice two power lines, and one data pair (basically one line with differential signaling)

http://upload.wikimedia.org/wikipedia/commons/thumb/6/67/USB.svg/220px-USB.svg.png


PCIe has serial lanes. Each lane transmits its data in serial form. A PCI-e connection with one serial lane is referred to as PCI-e x1, one with four as PCI-e x4 etc etc.

This has two reasons:

  1. Flexibility: It is easier to reconfigure mostly independent lanes
  2. Signal Skew.

If I signal data on multiple lines in parallel and the paths (cables+paths inside the device) are not of equal length then part of the signal might arrive out of sync. At high signalling speeds this was a serious problem.


Edit, as part of an answer to a comment. This is the pin-out for a PCI-e x1 connector. That one uses a signal lane on pins 16 and 17, but has many more connectors for other purposes (such as feeding power to the PCI-e card, signalling that a card is present etc etc)

enter image description here

Hennes

Posted 2013-01-02T15:08:03.943

Reputation: 60 739

Nice answer, 2 questions 1. USB 3 has more pins. Does it have parallel "lanes" like PCI-e? 2. Even 1-lane PCI-e has (judging from images) nearly 20 pins. Are these used for "sub-lanes"? – Bart van Heukelom – 2013-01-02T15:31:05.123

I will add a table with PCIe x1 pinsout. You will discover that many of them are not data pins. – Hennes – 2013-01-02T15:32:29.507

Also, yes. USB3 uses multiple data paths. One pair for the regular USB1/2 data, and two more pairs for 'superspeed' communication. – Hennes – 2013-01-02T15:42:51.497

Ok, it's clear now. It seems very wasteful/overheady to have that many pins not actually used for data, though I'm sure it's actually (sort of) the best way. – Bart van Heukelom – 2013-01-02T15:44:04.763

@BartvanHeukelom - Overhead doesn't exist in a situation like this. Each connection is seperate and does not effect one another unless designed to do so. – Ramhound – 2013-01-02T16:40:01.953

I mean overhead in a broader sense, "stuff you need just to make other stuff work" – Bart van Heukelom – 2013-01-02T17:06:25.933

6

Well, really the answer here is because that's the specification, but that's a bit of an oversimplification obviously. Let's talk about RS232 ("serial"), and that answer is sort of broadly applicable in the sense of "the manner in which these things are generally designed (at least at their most complex)".

In the case of RS232, you are correct - only two of those pins are actually for data transmission (one send, one receive). The others are for other relevant bits of the protocol that they've decided to give their own signal paths (detection, send and receive requests, etc).

enter image description here

To use the example of USB, it only has four pins - two data transmission pins, a +5V connection, and a ground. The USB specification rolls all the signalling that gets its own channel in RS232 onto the data channels.

(PCIe is a bit misleading - it's got two send and receive pins per lane...it's hard to call the overall design "serial" simply due to the lane architecture. Plus a bunch of grounds and power.)

Shinrai

Posted 2013-01-02T15:08:03.943

Reputation: 18 051

I'm just guessing here, but is there maybe also a physical difference between the pins/wires, e.g. data connections being wider or more insulated? – Bart van Heukelom – 2013-01-02T15:52:28.050

Not that I'm aware of - I'd seriously doubt it, it would make manufacturing them harder/more expensive. – Shinrai – 2013-01-02T15:52:58.930

@BartvanHeukelom - The number of pins is not the important difference between serial and parallel cables. Its how the transmit and recieve lines were used and how the standard was designed ( serial data vs parallel data ) in theory you could design both with the same number of pins if you wanted. – Ramhound – 2013-01-02T16:42:48.287

0

For completeness here's the RS232 DB25 pinout used in early PCs

RS232 DB25 pinout

In my experience, most computers and serial devices only really used pins 1-8, 20, 22 at most.

Here's a typical diagnostic breakout-box of that era:

RS232 Breakout Box

RedGrittyBrick

Posted 2013-01-02T15:08:03.943

Reputation: 70 632

I'm just wonder what the point of those "secondary" pins were. Redundancy? Higher reliability? Or was it a second channel? – 9a3eedi – 2019-09-02T04:12:49.340

Secondary channel – RedGrittyBrick – 2019-09-02T08:11:41.737