Updated on 17 September 2024

Manchester encoding – serial protocol decoding

Manchester encoding is a serial data signalling 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 in 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.

As with any engineering design choice, these advantages don’t come for free. Embedding the clock doubles the required network bandwidth.

Above, we mentioned that 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 logic levels. As we have at least one transition per bit period, the receiver has to detect the timing of the fastest complete cycle of the incoming waveform to work out the bit period. 

Our Manchester decoder uses the IEEE 802.3 standard as default to interpret the data; e.g. a falling edge in the middle of the bit period represents a logical low, and a rising edge in the middle of the bit period represents a logical high. To use our decoder in the G. E. Thomas/Manchester II implementation, use the Invert option in the decoder configuration tab. 

Capturing and analysing Manchester communications with PicoScope #

This guide will show you how to use the Manchester decoder in the PicoScope software.

Select Serial decoding from the tab on the left. If it doesn’t appear on the main page, select the More… tab and you’ll find it there. Select Manchester from the list of available protocols.

In the Configuration tab, select the corresponding PicoScope input channel for Data and provide the appropriate values for the relevant Manchester fields. 

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)
  • Ignore Edges (which edge to begin decoding on, 0 being the first edge)
  • Clock tolerance (allows for clock drift)

In the Display tab, select the desired Graph and Table display format options to display Manchester packets in the appropriate locations. 

Double-click a packet in the graph view to see the same packet in the table view, and vice versa, or use the zoom feature to focus on the appropriate areas of the decoder packets.

Did you find this article helpful?