Manchester code - what is it?

Serial digital communications has become quite popular. There are many varieties: among the standard interfaces at the board level, we have UART, SPI and I2C. Digital communication can also be achieved using analog signals. One example is a radio frequency data line that uses changes in analog amplitude, frequency, or phase to wirelessly transmit binary data. There are also high-speed differential interfaces, such as LVDS or USB-based serial communications.

Manchester code: what is it and why use it

When transmitting data, various coding methods are introduced to ensure data security and fast transfer. Manchester coding is one such digital coding method. It is very different from other methods, since by default each data bit length is fixed. The state of the bits is determined in accordance with the direction of the transition. Different systems present bit status in different ways, but most systems represent 1 bit versus low to high and 0 bits for high and low.

Manchester coding is a data modulation method that can be used in many situations, but is especially useful for binary transmission of information based on analog, radio frequency, optical, high-speed digital or long-range digital signals.

manchester code

Signal synchronization is the main advantage of Manchester coding. It provides higher reliability with the same data transfer rate compared to other methods. But Manchester coding also has some drawbacks. For example, it consumes more bandwidth than the original signal.

All types of coding according to Manchester have the following characteristics:

  • Each bit is transmitted at a fixed time.
  • β€œ1” is marked when the transition from high to low occurs; "0" is expressed when a low to high transition is performed.
  • The transition that is used for Note 1 or 0 exactly occurs in the middle of the period.

Coding in the general sense is the process of converting data into a format necessary to meet the needs for information processing, including:

  • Compilation and execution of the program.
  • Data transfer, storage and compression (decompression).
  • Processing data applications, such as file conversion.

All kinds of codes can have two meanings:

  • In computer technology, coding is the process of applying a specific code, such as letters, symbols and numbers, to data for conversion to an equivalent cipher.
  • In electronics, coding refers to analog-to-digital conversion.

A bit of history

The Manchester code (first published in 1949) is a synchronous clock coding technology used by the physical layer to encode a clock signal and data from a synchronous bit stream. In this method, the actual binary data to be transmitted over the cable is not sent as a sequence of logical units and zeros (known technically as Non Return to Zero or NRZ). Instead, the bits are converted to a slightly different format, which has several advantages over using direct binary encoding.

unit and zero

The Manchester code contains frequent level transitions that allow the receiver to extract a clock signal using a digital phase locked loop (DPLL) and correctly decode the value and timing of each bit. To ensure reliable operation using DPLL, the transmitted bit stream must contain a high density of bit transitions. All kinds of codes guarantee this, allowing the receiving DPLL to correctly extract the clock.

Technical description

A two-phase Manchester code can consume approximately twice the original signal bandwidth (20 MHz). This is a fine for introducing frequent transitions. For a 10 Mbps local area network, the signal spectrum lies between 5 and 20 MHz. Manchester coding is used as the physical layer of an Ethernet LAN, where additional bandwidth is not a significant issue for coaxial cable transmission. The limited CAT5e cable bandwidth required a more efficient encoding method for 100 Mbps transmission using the MLT 4b / 5b code. This uses three signal levels (instead of the two levels used in Manchester coding), and therefore, a 100 Mbps signal occupies only a 31 MHz bandwidth. Gigabit Ethernet uses five layers and 8b / 10b coding to provide even more efficient use of limited cable bandwidth by transmitting 1 Gbit / s in a 100 MHz bandwidth.

Definition of a concept

When transmitting data, the Manchester code is a form of digital encoding in which data bits are represented by transitions from one logical state to another. This differs from the more common method in which a bit is represented either by a high state, for example, +5 volts, or a low state, for example, 0 volts.

types of coding

When a Manchester II code is used, the length of each data bit is set by default. This makes the signal self-synchronizing. The state of the bits is determined in accordance with the direction of the transition. In some systems, the transition from low to high represents logic 1, and the transition from high to low represents logic 0. In other systems, the transition from low to high represents the logic of zero and one (as a transition from high to low).

Good, but not perfect. Pros and Cons of Technology

The main advantage of Manchester coding is the fact that the signal is synchronized. This minimizes error rates and optimizes reliability. The main disadvantage is the fact that the signal encoded in Manchester requires the transmission of more bits than in the original signal.

Despite the compelling benefits of standard digital communications over analog signaling, there are some common technology limitations.

One of them is the synchronization problem: the receiver must know exactly when the information is transmitted to select incoming data. Please note that this synchronization is not needed for analog audio transmission. The demodulated audio signal can be delivered to the speaker without explicitly interpreting the data on the receiver side.

Another disadvantage is the need to connect direct current. Digital data can include long continuous sequences of them or zeros, and thus the standard digital signal used to transmit this data will remain at the same voltage for a relatively long period of time.

Resolving Constraint Issues

Manchester coding offers a means to eliminate these two limitations. This is a simple digital modulation scheme that performs two functions:

  • ensures that the signal will never remain at a logic low or high level logic for a long period of time;
  • Converts a data signal to a data signal plus synchronization.

encoding methods

Encoding methods

In many cases, it is perfectly acceptable to use a separate clock to achieve synchronization between the transmitter and the receiver. But sometimes this approach is undesirable, for example, when you need to minimize the number of interconnections between parts of the system or when miniaturization requires a microcontroller with the least number of contacts, which can somehow provide the required functionality.

In other situations, a separate clock is simply not an option. For example, it would be extremely inefficient to include two separate radio frequency transmitters and receivers (that is, one for data and one for hours) in a complex wireless data line.

Interface limitations

In the case of the UART interface, instead of the external clocks transmitted by the transmitter and receiver, internal clock signals can be used. But this strategy brings significant limitations:

  • It is not resistant to frequency changes, which become more problematic when the transmitter and receiver are in different conditions.
  • It is not flexible because it requires the Tx and Rx devices to be explicitly pre-configured for the same data rate.
  • Typically, the receiver requires an internal clock speed that is significantly higher than the data rate, and this can lead to severe restrictions on the maximum data rate.

kinds of codes

DC avoidance

Complex systems, especially those with high voltage, are not always able to provide the common-mode voltage of the transmitted signal, which is compatible with the allowable range of the general mode of the receiver. Another problem is damage currents. Permanent connection does not protect against dangerous long-term currents resulting from a short circuit.

Thus, AC connection is an easy way to reduce the inconvenience and risks associated with common mode voltage modes and failure modes.

Line coding technology is used in standard Ethernet networks, the specified one is used in IEEE 802.3 standard. Line coding is the process by which digital information in a binary bitstream is converted into electrical signals for transmission.

How it works

The two-level code uses a voltage transition in two states to represent one bit of information. Binary 0 represents the transition from a higher to a lower voltage during the time set to transmit one bit (that is, one β€œbit time”). Binary 1 is represented by a transition from the lowest to the highest. For Ethernet networks, the high voltage is usually +0.85 volts, and the low voltage level is usually -0.85 volts, which makes each voltage transition equal to 1.7 volts.

code manchester ii

Positive aspects of the process

Manchester coding has the advantage of allowing data to be transmitted without the need for an additional clock signal. This is possible because voltage transitions occur in the middle of each bit interval, which sets the synchronization pattern. Thus, changing the average interval allows the receiving stations to maintain proper synchronization with each other to ensure transmission integrity. Due to the additional transition to the bit, which is used for synchronization purposes, Manchester coding is only 50% efficient. For example, to obtain a data transfer rate of 10 Mbit / s, a bandwidth of 20 MHz is required.

manchester coding

Another version, called differential Manchester coding, is a binary zero code by switching the voltage at the beginning of the bit interval and a binary unit code without a transition at the beginning of the bit interval. In both cases, the transition occurs in the middle of the interval for synchronization purposes. Differential Manchester encoding is used for Token Ring IEEE 802.5 networks.

Source: https://habr.com/ru/post/C15607/


All Articles