Probably so that the voltages induced by the ground currents don't interfere with each other. Copper is not a perfect conductor, so a current transmitted through copper results in a small voltage change. If they all returned through the same wire, the ground voltage would be affected by all three signals, and allow the colors to bleed into each other.
Also this would allow each pair of wires to be tightly twisted, so that the magnetic fields created from the currents going up one and down the other cancel each other out, reducing emissions. If they all used a common ground wire, there would be more loop space between them?
Oh yeah. Impedance is important, too, at video frequencies. The pairs need to have a given characteristic impedance so that there are no reflections when the signal gets to the monitor.
(Disclaimer: I Am Not An Electrical Engineer.)
A “pin” is a type of electrical contact. Contacts are (typically) metal surfaces which are pressed against matching surfaces on the matching connector (the cable plugged into the hard drive, here), thus making an electric circuit.
The primary concern with contacts is making a reliable low-resistance connection. For this purpose, contact surfaces are generally gold-plated; gold does not form hard non-conductive oxide layers unlike many other metals. The metal under the plating will be different; gold is soft and expensive, and so kept to a thin layer.
Issues specific to power:
- Power connections carry more current than data connections, as the voltage drop produced by high resistances wastes energy, causes heating of the connection, and may cause malfunctions. To minimize the resistance, wires and contacts for power are often larger than those for data, but there is no specific reason not to use the same materials and similar physical structure.
Issues specific to data:
At high data rates (therefore high signal frequencies), the signals more obviously propagate as waves in the metal. This results in the physical shape becoming more important (minimizing sharp irregularities), whereas for DC power it is completely irrelevant. A cable where this is relevant is known as a transmission line.
When data is carried over multiple parallel wires at high rates, it is important that all of the wires are the same length, so that the matching signals arrive at their destination at the same time.
You also asked about the number of pins. Multiple power pins may have two purposes:
Carrying more current: two lines in parallel have half the total resistance, and so the power loss is less. A single line of double the cross-section would also have half the resistance, but might not fit well into the connector design.
Multiple voltages: A power supply might provide, say, both +5V and +12V as well as ground (0V) in a single cable, or both positive and negative (relative to ground) voltages.
Purposes of multiple data lines:
Higher total data rates: You can send twice as many bits through two lines as one, while using the same frequency. This is the motivation for parallel data connections, which generally have many lines (e.g. 8 lines to send a byte at once), but may be less reliable than serial connections, due to timing issues as I mentioned above.
Independent signaling: There may be specific functions which are most easily handled by separate hardware connected to separate lines so that their communication does not have to be multiplexed on a single set of data lines.
Differential signaling: This is a technique for reducing the amount of electrical noise picked up by a cable. Two wires, often twisted together (twisted pair) are used to carry a single signal, with the opposite polarity (that is, the voltages in the two wires sum to a constant value at all times). The electric field around the cable will affect both wires almost identically, and the receiving end uses a circuit which looks only at the difference between the two signals to recover the intended data signal. (Ethernet and USB both use this technique; see this question.)
The documentation of the purposes of the contacts in a given connector is called its pinout. For example, according to pinouts.ru, the pinout of Serial ATA (SATA), one of the hard drive connection types mentioned in the question you linked, is:
Pin Name Function
1 GND Ground
2 A+ Transmit+
3 A- Transmit-
4 GND Ground
5 B- Receive-
6 B+ Receive+
7 GND Ground
The “+” and “-” indicate differential signaling pairs. The “Transmit” and “Receive” names indicate that this has separate lines for communication in each direction (this removes the need to negotiate direction of communication), and since there is only one differential pair per direction, this is a serial connection. The three ground lines are used to absorb electrical noise by physically surrounding the data lines and separating them from each other. You can also see that since there are no power lines (that is, no lines at a constant voltage other than ground=0V), this connection does not supply power.
On the other hand, USB provides power (+5V, 0V) in the same cable as data, and uses a single differential pair for data, combining transmit and receive.
Best Answer
The answers are in the datasheet:
Points 3, 4 and 5 tell you what the pins do. INx are digital inputs for controlling motor direction. ENx are digital inputs for enabling each motor. The CS pins are for current monitoring purposes. There is a small resistor (e.g. 0.5 ohms in this case) between this pin and ground, so the current will be translated to a voltage at the CS pin (e.g. 1A * 0.5 ohms = 0.5V)
You can see the two large 3W, 0.5 ohm current sense resistors clearly in the picture below:
Here is an example from the L298 datasheet:
The quality isn't very good, sorry. Note this shows only 1/2 of the LM398. Hopefully you can see the resistor at the bottom left, with a tap off to "control circuit" (e.g. current can be controlled if desired, and monitored for overcurrent)
The truth table gives the same info as points 3, 4, 5. C and D equal IN1 and IN2 (or IN3, IN4 for the other half) Ven equals EN1 (or EN2..) and the pin with the resistor is CSA (or CSB)
Hope this all makes sense.