5

I've always been taught that an interface with no DC offset (the same amount of 1s and 0s when averaged over time) is desirable. To this end, often encodings like 8b10b will include a running disparity which compensates accordingly.

Looking at the wikipedia entry for 8b10b, it mentions that the discrepancy between 1s and zeros is limited to 2 either way:

8b/10b coding is DC-free, meaning that the long-term ratio of ones and zeros transmitted is exactly 50%. To achieve this, the difference between the number of ones transmitted and the number of zeros transmitted is always limited to ±2, and at the end of each symbol, it is either +1 or −1. This difference is known as the running disparity (RD).

Over a long period, this is an incrediby small tolerance for the duty cycle.

What is the electrical benefit of doing this?

stanri
  • 5,352
  • 2
  • 27
  • 54

2 Answers2

4

First - synchronization, it is easy to spot the difference between zeros and ones if they both occur often.

Imagine you are in a tunnel, someone far away has a flashlight. You agree how long should a "one" and a "zero" last. If he keeps sending 0101010101 it will be very easy to count all zeros and ones. It should also not be that hard if the pattern is 001001001. But if 1000 ones are sent in a row, how can you be sure that it is 1000 and not 999 or 1003? Even if you both had atomic clocks, they would drift apart. Sending an approximately equal amount of zeros and ones helps solve this problem.

Second - coupling. It is often beneficial to galvanically isolate the devices from the communication circuit (long cables, lightning etc.). Such isolation is often done with a transformer (eg. Ethernet) and transformers can't transfer DC. A transformer may pass a couple of ones in a row, but then the core will go to saturation and the signal will be lost.

filo
  • 8,801
  • 1
  • 25
  • 46
  • 1
    Yep, PCIe for example is AC-coupled. If the numbers of 1s and 0s was not roughly 50%, this would not work as AC coupling is predicated on passing only an AC signal component -- DC would build up a charge on the capacitor and then be blocked. Likewise, SATA is AC-coupled as well. – Krunal Desai Jun 28 '16 at 18:27
3

Classically this sort of encoding was accomplished using manchester encoding, which has an over head of 100%, i.e. you need 2X symbols to ensure that you get 1X the data through. The 10b8b or variants are far more bandwidth efficient with only a 1.25 factor. There are even higher order schemes that are more efficient. Of course these all require sophisticated sequencers which weren't available when manchester came on the scene.

The DC removal aspects were mentioned before, but there is an important aspect that not having DC gives you. Some modern receivers use the concept of a matched filter in which a correlation stage is used to detect a particular symbol in the stream. This requires that you have bits represented with both positive and negative voltages and the the mixer/correlator also operates with positive and negative values. This allows you to detect correlation, anti-correlation and orthogonality.

If you have a DC term on the received signal, the receiver correlator code can "leak" through and be detected as a false positive.

Other advantages is that these codes can be self clocking, which means that with the right circuitry you can detect and phase align to the symbols without carrying additional signals. In fact all of these signally implementations will have a CDR (Clock Data Recovery) circuit tied to a tracking PLL (Phase Locked Loop)

the DC blocking also allows for galvanic isolation which is important for large distances and large loop areas and stray voltage/current pickups. Principally for resiliency in noisy environments

placeholder
  • 29,982
  • 10
  • 63
  • 110