Manchester code
From Wikipedia, the free encyclopedia
In telecommunication, Manchester code (also known as Phase Encoding, or PE) is a form of data communications line code in which each bit of data is signified by at least one voltage level transition. Manchester encoding is therefore considered to be self-clocking, which means that accurate synchronization of a data stream is possible. Each bit is transmitted over a predefined time period.
However, there are today many more sophisticated codes (8B/10B encoding) which accomplish the same aims with less bandwidth overhead, and less synchronisation ambiguity in pathological cases.
Contents |
[edit] Use
Manchester coding has been adopted into many efficient and widely used telecommunications standards, such as Ethernet.
[edit] Features
Manchester coding provides a simple way to encode arbitrary binary sequences without ever having long periods without level transitions, thus preventing the loss of clock synchronization, or bit errors from low-frequency drift on poorly-equalized analog links (see ones-density).
If transmitted as an AC signal it ensures that the DC component of the encoded signal is zero, again preventing baseline drift of the repeated signal, making it easy to regenerate and preventing waste of energy.
[edit] Description

Tip: original data clock XOR result
0 0 0 0 1 1 1 0 1 1 1 0
Summary:
- Time is divided into periods, and one bit is transmitted per period
- A "0" is expressed by a low-to-high transition, a "1" by high-to-low transition (according to G.E. Thomas' convention--in the IEEE 802.3 convention, the reverse is true)
- The transitions signifying 0 or 1 occur at the midpoint of a period
- Transitions at the beginning of a period are overhead and don't signify data
Manchester codes always have a transition at the middle of each bit period, and depending on the state of the signal, may have a transition at the beginning of the period as well. The direction of the mid-bit transition is what carries the data, with a low-to-high transition indicating one binary value, and a high-to-low transition indicating the other. Transitions that don't occur mid-bit don't carry useful information, and exist only to place the signal in a state where the necessary mid-bit transition can take place. Though this allows the signal to be self-clocking, it doubles the bandwidth requirements compared to NRZ coding schemes (or see also NRZI).
In the Thomas convention, this results in the first half of a bit period matching the true bit value and the second half being the complement of the true bit value. This is in contrast with non-return-to-zero coding schemes.
[edit] Manchester Encoding as Binary Phase Shift Keying
Manchester encoding is just a special case of Binary Phase Shift Keying, where the data to be transmitted controls the phase of a square wave carrier that is at the data rate in frequency. Therefore, it is extremely easy to generate such a signal digitally.
To control the consumed amount of bandwidth, a filter can be used to reduce the bandwidth to as low as 1Hz per bit/second, and still not lose any information during transmission. However, for practical reasons (and to further control bandwidth consumption, especially on crowded radio bands), most BPSK modulators choose a carrier frequency which is much higher than the data rate, thus resulting in tighter, more easily filtered bandwidths. The property of 1Hz/bit/second is preserved, however.
[edit] Conventions for representation of data
There are two opposing conventions for the representations of data.
The first of these was first published by G. E. Thomas in 1949 and is followed by numerous authors (e.g., Andrew S. Tanenbaum). It specifies that for a 0 bit the signal levels will be Low-High (assuming an amplitude physical encoding of the data) - with a low level in the first half of the bit period, and a high level in the second half. For a 1 bit the signal levels will be High-Low.
The second convention is also followed by numerous authors (e.g., Stallings) as well as by IEEE 802.4 (token bus) and old revisions of IEEE 802.3 (Ethernet - most modern deployments use PAM based medium) standards. It states that a logic 0 is represented by a High-Low signal sequence and a logic 1 is represented by a Low-High signal sequence.
If a Manchester encoded signal gets inverted somewhere along the communication path, it transforms from one variant to another. However, such cases can be easily overcome by using differential Manchester encoding.
[edit] Shortcomings
A consequence of the transitions for each bit is that the bandwidth requirement for Manchester encoded signals is doubled compared with asynchronous communications, and the signal spectrum is considerably wider. Although Manchester encoding is a highly reliable form of communication, the bandwidth requirements are seen as a disadvantage, and most modern communication takes place with protocols with more modern line codes which achieve the same goals with better coding performance and smaller bandwidth requirements.
One consideration with Manchester encoding is synchronising the receiver with the transmitter. At first sight it might seem that a half bit period error would lead to an inverted output at the receiver end, but further consideration reveals that on typical data this will lead to code violations. The hardware used can detect these code violations, and use this information to synchronise accurately on the correct interpretation of the data.
[edit] References
- Stallings, William (2004). Data and Computer Communications (7th ed.). Prentice Hall, 137-138. ISBN 0-13-100681-9.
- Some source: from Federal Standard 1037C in support of MIL-STD-188
[edit] Further reading
http://www.erg.abdn.ac.uk/users/gorry/course/phy-pages/man.htmlCoded Mark Inversion