The Differential Manchester Code is a variation of the Manchester code. After searching around the internet for a while to find more info about this method, i sadly discovered that although there are many sites explaining the Differential Manchester Code, most of them do not make it very clear. So i had to seek in my books for more info. I then discovered that it is not that hard to understand the differential coding algorithm after all. Let's see an example:
Like before, the transmission line is kept HIGH when no data is sent (before Start and after End). There are 2 encoding methods: The first is the "Transition on LOW" and the second is the "Transition on HIGH". Both methods work exactly the same. For this example i am going to use the first method, "Transition on LOW".
Here is how it goes. In the middle of each clock pulse, a transition occurs, regardless of the bit that was sent or is about to be sent. A data bit is send during each negative clock transition. If the data bit is 0, then a polarity transition occurs (if was HIGH it goes LOW, and if it was LOW it goes HIGH), otherwise the line remains unchanged.
In our example, the data that is transmitted is the binary '10011101' (starting from left to right). Each data bit is transmitted during negative transition of the clock. I have mark these clock transitions with red lines (except the first and last lines which indicate the start and stop of the transition). Between each bit transmission, the code line changes polarity. This is done to help the receiver recreate the clock signal and synchronize with the transmitter. As i said before, i will use the "Transition on LOW" method. This means that when a bit is transmitted, if this bit is ZERO the data line changes polarity. Otherwise, if the bit is 1 the data line polarity remains unchanged.
Suppose now that we want to transmit this byte (10011101). The code line is HIGH. The transmission is initiated by pulling the code line LOW. After half a pulse, the output is pulled HIGH. This is part of the synchronization transition that occurs every middle of a bit transmission. Half a pulse next, the first bit is transmitted. The first bit is 1 (starting from left), so the code line polarity remains unchanged. After half a pulse, the code line polarity changes state and goes LOW. After one full pulse, the second bit is about to be transmitted. This bit is the 0, so the code line changes polarity and goes HIGH. The same algorithm is used to transmit all 8 bits of the data. Finally, the code line is pulled HIGH and the transmission ends.
The major difference between the Differential Manchester Code, is that the receiver does not need to know the polarity of the signal. The polarity can be figured from the line transitions. In the above example, and NOT from the code line polarity. This is something that makes this method kinda difficult to understand. It does not matter whether a logical 1 or 0 is received, but only whether the polarity is the same or is different from the previous value.