Figure 3 shows two different options for encoding the data. There has been some debate over which scheme is more advantageous. The Ethernet and IEEE standards describe Option B as the method for encoding data, while the original Manchester-encoded specification described Option A. Confusion may occur when looking at the voltage signals on a Manchester-encoded line. Most line drivers will invert their signals, which have led some to believe that Option B is being implemented. In the end, when developing your own custom-designed embedded system, the choice as to which option is best may be purely academic. However, once a choice has been made, consistent implementation is a necessity.
View the full-size image
With this information, let's construct a Manchester-encoded bit stream using Option A. We will use the binary bit pattern shown in Figure 1. The first thing to do is establish what are called bit boundaries. These are the points in time where a level transition occurs. Bit boundaries are analogous to one clock period in an NRZ scheme. It's these bit boundaries that define the points where Manchester encoding of the individual bits will occur.
Figure 4 illustrates the bit stream constructed using Manchester encoding. Each point where you see an arrow is defined as the bit boundary. The arrow indicates the direction of the transition. So, using Option A from Figure 3, the first binary "1" bit is translated by a transition from a high to a low level. One clock period later, another transition occurs. This time a binary "0" bit has been encoded by a low- to high-level transition.
View the full-size image
Further down the bit stream, you will notice a transition that looks out of place. It occurs at a point halfway between two clock periods. This is called the setup point. The reason for the setup point is to ensure the signal is at the correct level prior to the next bit boundary.
Construction of Manchester-encoded data
Manchester encoding is very easy to construct. You simply combine the serial bits to be encoded with the clock running at the bit-boundary rate (see Figure 5). When you compare the Manchester-encoded output in Figure 5 with the bit stream in Figure 4, you'll see the same waveform.
View the full-size image