Manchester encoding

Manchester encoding is a form of binary phase-shift keying (BPSK) that has gained wide acceptance as the modulation scheme for low-cost radio-frequency (RF) transmission of digital data. Manchester is a simple method for encoding digital serial data of arbitrary bit patterns without having any long strings of continuous zeros or ones, and having the encoding clock rate embedded within the transmitted data. These two characteristics enable low-cost data-recovery circuits to be constructed that can decode transmitted data with variable signal strengths from transmitters with imprecise, low-cost, data-rate clocks.
Once the Manchester-encoded data has been data-sliced into a serial data stream with restored logic-level voltages, a data-decoder is used to extract the original serial data information that was encoded. Typically, the data-decoder is a simple microcontroller running a software algorithm that identifies the binary transitions between logic levels to assign a binary “1” or “0” value to the data. In a given system, the microcontroller software can anticipate the timing of the logic-level transitions, knowing the approximate baud rate of the encoded data. This utilizes the second benefit of Manchester-encoded data—the embedded baud-rate clock. In situations where the received data stream is close to the noise floor (low RF-signal levels from distant transmitters, for example) the transition edges might have multiple transitions on the data-slicer output. A microcontroller software algorithm can be written to not only anticipate the timing of valid edges but which can reject further edges that occur until the next valid edge transition time. Although hardware implementations of data-decoders can be realized, the complexity of the circuit often is not cost-competitive with a simple microcontroller. Further, the microcontroller can perform other functions such as activating digital outputs when certain data is received, such as unlocking a car door when the proper identification key and control function are decoded.