Differential Manchester encoding
Differential Manchester encoding (also known as CDP; Conditional DePhase encoding) is a method of encoding data in which data and clock signals are combined to form a single self-synchronizing data stream. It is a differential encoding, using the presence or absence of transitions to indicate logical value. This gives it several advantages over vanilla Manchester encoding:
- Detecting transitions is often less error-prone than comparing against a threshold in a noisy environment.
- Because only the presence of a transition is important, polarity is not. Differential coding schemes will work exactly the same if the signal is inverted (wires swapped). (Other line codes with this property include NRZI, bipolar encoding, biphase mark code, coded mark inversion, and MLT-3 encoding).
A '1' bit is indicated by making the first half of the signal equal to the last half of the previous bit's signal i.e. no transition at the start of the bit-time. A '0' bit is indicated by making the first half of the signal opposite to the last half of the previous bit's signal i.e. a zero bit is indicated by a transition at the beginning of the bit-time. In the middle of the bit-time there is always a transition, whether from high to low, or low to high. A reversed scheme is possible, and no advantage is given by using either scheme.
A related method is Manchester encoding in which the meaningful transitions are the mid-bit ones, and these encode data by their direction (positive-negative is one value, negative-positive is the other).
Differential Manchester is specified in the IEEE 802.5 standard for token ring LANs, and is used for many other applications, including magnetic and optical storage.
Note: In differential Manchester encoding, if a "1" is represented by one transition, then a "0" is represented by two transitions and vice versa.