Manchester encoding – introduction

Manchester encoding is a serial data signaling system originally developed at the University of Manchester for use on early generation computer systems with magnetic drum and 1600 bpi magnetic tape data storage devices. It is in widespread use today in network communications such as 10BaseT Ethernet and MIL-STD-1553, as well as consumer IR devices and DALI lighting controls.

Manchester waveforms are “self-clocked”; the clock signal is embedded in the transmitted data using an exclusive-OR Boolean function. Embedding the clock means that only one signal line is needed, rather than two or three that are required with standards such as I2C and SPI. This makes for simpler and lower-cost network wiring layout, and has several other advantages:

  • Removes the need to manually preset and match transmitter and receiver baud rates.
  • Clock / data skew is eliminated. Receiving devices are tolerant of jitter and frequency drift from the transmitter.
  • In some cases, such as wireless and optical transmission networks, there isn’t a simple or low-cost way to add a second channel for the clock, which mandates a self-clocking technique.
  • The embedded clock guarantees one or two edge transitions each bit period, which means that the transmitter and receiver can be AC coupled and therefore galvanically isolated from the network wiring. This avoids common-mode overvoltage problems and gives protection if a short circuit occurs in the network.
  • Guaranteed transitions each bit period, even in the event of long sequences of 1s or 0s, enables straightforward recovery of the clock and data signal by the receiver.
Data and clock waveforms encoded in Manchester format using an XOR Boolean algorithm.

As with any engineering design choice, these advantages don’t come for free. Embedding the clock doubles the required network bandwidth. But for many applications Manchester is a good and widely used communications protocol.

Manchester encoded waveform with a bit-period of 810 microseconds.

Manchester encoding uses an exclusive-OR Boolean function to combine the clock and data on a single channel. This means that binary information is conveyed as transitions rather than levels.

The transmitted Manchester data is clocked on the rising edge of the serial clock.

Note that there is always at least one transition per bit period, to enable clock recovery by the receiver and AC coupling across the network. The receiving device has to detect the timing of the fastest complete cycle of the incoming waveform to work out the bit period. From there, low-to-high transitions are received as binary zeros, high-to-low transitions as ones. (Or vice versa – depending on how the standard is implemented.)

MIL-STD-1553 Manchester encoded waveform

In the absence of any data to be sent, or when there are long sequences of zeros or ones, the clock information is still transmitted to keep the receiver synchronized.

List of serial protocol decoders included in PicoScope, with Manchester highlighted.

Manchester waveforms can be decoded with PicoScope*. From the Tools menu select Serial Decoding, then Create, and select Manchester from the list of available protocols.

* Currently implemented in PicoScope 6.14 Beta

Transmitted Manchester data is normally sent in packets that are arranged in fields that make up the complete protocol per the design specification for a particular application. Field settings include:

  • Word length. Typically 8 to 64 bits
  • Bit order: LSB or MSB first
  • Start bits
  • Preamble length (words)
  • Header length (words)
  • Data length (words)
  • Checksum length (words)

The PicoScope Manchester decoder settings panel allows each field to be set up to match the system design.

Decoded waveform data can be displayed:

  • In graph: aligned with the captured waveform
  • In table: listed in a tabular format

Double-clicking on a line in the table highlights the corresponding packet in the graph display.