I can see the advantage of Manchester code over NRZ: you get clock and data in one signal combined. But what does differential Manchester add to that?
\$\begingroup\$ Go look at the irig 106 spec. There are several encoding schemes manchester is just one these alternate names map into the nrz-l,m,s biphase l,m,s. There are two benefits over NRZ-L for these biphase ones in particular one is the clock is embedded, the second is you never go more than two half bit cells with a transition so your frequency window is much tighter, transmission is easier, decoding and in particular locking on is easier. mahchester, manchester-II, differential manchester, etc are just subtle differences to the definition of a 1 and 0. \$\endgroup\$– old_timerMar 1, 2017 at 18:30
According to wiki answers: -
Unlike with Manchester encoding, only the presence of a transition is important, not the polarity. Differential coding schemes will work exactly the same if the signal is inverted (wires swapped).
That sounds a nice feature to me.
On another wiki answer it says it gives better noise immunity than normal M-encoding. And on another it explains how it achieves it: -
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.
Following a little trawl on the web I thought I'd put this drawing in that I modified to show how the bit transitions indicated logic 1 and logic 0 data: -
This is why the data stream can be inverted and you can still decode correctly.
5\$\begingroup\$ I don't really grasp the "better noise immunity" theory. It would be the same bandwidth, same number of transitions, etc. as standard Manchester for random data. \$\endgroup\$ Sep 26, 2013 at 8:11
\$\begingroup\$ @travis it's interesting - I'm just quoting from wiki so I don't really have any answer other than I'm thinking it may have more transitions (still looking into it) which might also help clock recovery. \$\endgroup\$– Andy akaSep 26, 2013 at 8:19
\$\begingroup\$ If you have more transitions, transmission reliability should go up as well as transmission power. And you could exploit the patterns in the data to optimize either way by choosing differential or standard Manchester. Unless the data is highly deterministic I think the difference is quite negligible. Its an interesting question, but I don't think there is an interesting answer to be had. \$\endgroup\$ Sep 26, 2013 at 8:27
\$\begingroup\$ @travis I've come to the conclusion that there are no extra transitions in DME over straight ME and the only advantage appears to be you can swap the wires over. A "1" is sent as a single transition in the middle of a bit and a "0" is sent as two transitions; one at the start and one at the middle of each bit - this is how/why you can swap the wires over or invert the signal. Cool technique though. \$\endgroup\$– Andy akaSep 26, 2013 at 8:48
One "problem" with normal manchester coding is that a steady stream of encoded zeros looks exactly like a steady stream of encoded ones (unless you are in sync). In my case I wanted the line to idle with a known signal and frame the packets with a single start bit (= one). (I wanted to avoid a longer preamble to shorten the response time). By using differential manchester coding I can idle the line at zero and rest assured that the receiver will be in sync when I send the first start bit (one). (please note that I have defined No transition at start bit as "0" and transition at start bit as "1" = opposite of the picture above). Thus; one advantage with differential manchester encoding is that the receiver can reliably lock onto a steady stream of equal symbols that has no transition at start bit.
\$\begingroup\$ This is actually a super important observation to understand about differential encoding! \$\endgroup\$ Dec 24, 2020 at 12:02
I have no theoretical additions to the answers already here. But this tool gives an intuitive understanding of the differences. Biphase-L is Manchester encoding. The other two biphases are differential Manchester encodings. Particularly, you can see @Oyvin's answer in action.