Manchester Encoded Data
There are two Manchester encoding standard, depending on the data available in the first and second halves of bit time. Manchester encoded signal as per G.E. Thomas, a ‘0’ is transmitted by low-to-high transition and a ‘1’ is expressed by high-to-low transition. This is represented in Figure 1: Manchester Ecoded Data (As per G.E. Thomas). Manchester encoded signal as per IEEE 802.3 is the opposite of G.E. Thomas, where a ‘0’ is transmitted by high-to-low transition. In this document, G.E. Thomas standard has been used (Figure 2: An example of Manchester encoding (Source: https://en.wikipedia.org/wiki/Manchester_code).
Figure 1: Manchester Ecoded Data (As per G.E. Thomas)
Figure 2: An example of Manchester encoding (Source: https://en.wikipedia.org/wiki/Manchester_code)
Manchester Encoder Implementation
For Manchester Encoder, user needs to synchronize the clock edges and data input edges. SPI master provides the slave synchronization clock input to the device. Once you perform XOR of MOSI and SCLK outputs from SPI master, you can easily implement a Manchester Encoder as per G.E. Thomas standard.
Manchester Decoder Implementation
If a delay of three-fourths bit time is triggered by the incoming mid-bit transition, the value captured at the end of the delay tells the next bit value (Figure 5: Manchester Decoder Outputs).
Figure 5: Manchester Decoder Outputs (Source AN2358)
By using PWM and SmartIO we can easily captures input encoded data after ¾ bit time from the mid-bit transition and realize Manchester Decode.
Encoder_PSoC4200M_AddSync_1K/ Encoder_PSoC4200M_AddSync_1K can generate 1K/4M data rate output. You can adjust the actual data rate of SPIM component for customize data rate.
SmartIO_Based_ManchesterDecoder_1K/ SmartIO_Based_ ManchesterDecoder_4M, can decode 1K/4M data rate Manchester data stream. You can adjust the NCO_Clk frequency and Compare value of NCO(PWM) component for customize data rate.