A method and apparatus for receiving and decoding a Manchester code

By employing a partial coverage detection window on the time axis and data header-assisted decoding in Manchester code reception and decoding, the problem of high hardware cost is solved, achieving low-cost and high-reliability Manchester code decoding.

CN117176295BActive Publication Date: 2026-11-273PEAK INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310065066.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-16
Publication Date
2026-11-27
Estimated Expiration
2043-01-16

AI Technical Summary

Technical Problem

Existing Manchester code reception and decoding methods have high hardware costs while ensuring reliability, and suffer from additional power consumption and area overhead due to oversampling.

Method used

A detection method is adopted that uses a detection window set on the time axis to only partially cover the duration of valid data. A detection clock signal is generated, and the valid data transmission rate information is obtained through the data header, which is then amplified and decoded.

Benefits of technology

It reduced hardware costs, avoided oversampling, ensured reliable detection of each bit, and improved signal quality and link reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117176295B_ABST
    Figure CN117176295B_ABST
Patent Text Reader

Abstract

The application provides a Manchester code receiving and decoding method and device, and relates to the technical field of data receiving and decoding. The method comprises the following steps: receiving effective data; generating a detection clock signal according to the effective data transmission rate; and detecting the effective data in a detection window set on a time axis according to the detection clock signal; wherein the detection window only partially covers an effective data duration. The method avoids the detection of too many and too dense windows, and also avoids the detection of multiple windows for one bit signal, thereby reducing the hardware cost. Without oversampling, each bit can be sampled, and reliability is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission reception and decoding technology, and in particular to a method and apparatus for receiving and decoding Manchester code. Background Technology

[0002] Digital signal encoding aims to solve the problem of representing digital data as digital signals, that is, to represent data by encoding digital signals. Digital signal encoding is generally performed by hardware, and the three most common encoding methods are: Non-Return-to-Zero (NRZ) code, Manchester encoding, and Differential Manchester encoding. This application focuses on the latter two.

[0003] Manchester encoding is commonly used for local area network (LAN) transmission. In Manchester encoding, each bit has a transition in the middle, which serves as both a clock signal and a data signal; a high-to-low transition represents "0", and a low-to-high transition represents "1", such as... Figure 1 It exhibits the following two patterns:

[0004] 1. At the midpoint of a bit's cycle: a transition from low to high (i.e., rising edge) represents 1, and a transition from high to low (i.e., falling edge) represents 0;

[0005] 2. At the boundary between bits: when there are consecutive 1s, a downward transition will occur; when there are consecutive 0s, an upward transition will occur.

[0006] Another type is differential Manchester encoding, where the transition in the middle of each bit only provides clock timing, and the presence or absence of a transition at the beginning of each bit represents "0" or "1", with a transition indicating "0" and no transition indicating "1".

[0007] Existing Manchester code reception and decoding methods involve detection covering the entire effective data transmission period, which is oversampling. While this ensures data reliability, it also consumes a lot of hardware.

[0008] Therefore, ensuring reliability while reducing hardware costs are technical problems that need to be solved. Summary of the Invention

[0009] The purpose of this application is to provide a method and apparatus for receiving and decoding Manchester code, so as to solve the technical problems of ensuring reliability and reducing hardware costs in the prior art.

[0010] To achieve the above objectives, the embodiments of this application adopt the following technical solutions.

[0011] In a first aspect, embodiments of this application provide a method for receiving and decoding Manchester code, including:

[0012] Receive valid data;

[0013] Generate a detection clock signal based on the effective data transmission rate;

[0014] Based on the detection clock signal, valid data is detected within a detection window set on the time axis; wherein, the detection window only partially covers the duration of the valid data.

[0015] Optionally, the step of generating a detection clock signal based on the effective data transmission rate includes:

[0016] A detection clock signal with a set frequency is generated based on the effective data transfer rate stored in the register or non-volatile memory.

[0017] Optionally, before the step of generating a detection clock signal based on the effective data transmission rate, or before the step of receiving effective data, the method further includes:

[0018] Receive a data header, which carries the transmission rate information of the valid data;

[0019] Parse the valid data transmission rate information in the data header.

[0020] Optionally, the data header includes a data header end identifier to indicate the end of the data header and the beginning of valid data.

[0021] Optionally, the data in the data header, excluding the data header end marker, is periodically distributed with alternating high and low levels, and the transmission rate information of the effective data is carried by the duration of each high or low level.

[0022] Optionally, the step of receiving the data header precedes the step of receiving valid data. The step of receiving the data header includes: determining the amplification factor based on the voltage difference between the high and low levels in the data header, and amplifying the signal of the data header.

[0023] The steps for receiving valid data include: amplifying the signal of the valid data according to the amplification factor.

[0024] Secondly, embodiments of this application provide a Manchester code receiving and decoding apparatus, comprising:

[0025] The clock module is used to generate a detection clock signal based on the effective data transmission rate;

[0026] The window detection module is used to receive valid data and detect valid data within a detection window set on the time axis according to the detection clock signal; wherein, the detection window only partially covers the duration of the valid data.

[0027] Optionally, the Manchester code receiving and decoding device further includes:

[0028] Registers or non-volatile memory are used to store the effective data transfer rate;

[0029] The clock module is used to generate a detection clock signal at a set frequency based on the effective data transfer rate stored in the register or non-volatile memory.

[0030] Optionally, the Manchester code receiving and decoding device further includes:

[0031] The rate detection module is used to receive a data header, which carries the transmission rate information of valid data, and to parse the valid data transmission rate information in the data header.

[0032] Optionally, the window detection module includes:

[0033] An amplification module is used to determine the amplification factor based on the voltage difference between the high and low levels in the data header, amplify the signal of the valid data, and output an amplified signal.

[0034] The generation module is used to generate a clock trigger signal based on the detected clock signal;

[0035] The D flip-flop module is used to generate output data based on the clock trigger signal and the amplified signal.

[0036] Optionally, the amplification module is used to receive an enable signal, amplify the signal of the valid data under the enable condition, and output the amplified signal to the D flip-flop module;

[0037] The generation module is used to generate a clock trigger signal and an enable signal according to the detection clock signal and the detection window size. The enable signal is ahead of the clock trigger signal to ensure that the D flip-flop module has already completed the settings according to the amplification signal when it receives the clock trigger signal.

[0038] Compared with the prior art, this application has the following advantages:

[0039] The Manchester code receiving and decoding method and apparatus provided in this application detect valid data through a detection window set on the time axis, wherein each set window corresponds to one valid data bit. This avoids excessive and dense detection, as well as repeated detection of the same valid data bit, thus reducing hardware costs. It ensures reliability by sampling each bit without oversampling. Attached Figure Description

[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 A schematic diagram of a Manchester code receiving and decoding method provided in an embodiment of this application;

[0042] Figure 2 A schematic diagram of two types of data headers, valid data, and windows on a timeline provided for embodiments of this application;

[0043] Figure 3 A schematic diagram of a Manchester code receiving and decoding device provided for an embodiment of this application;

[0044] Figure 4 A schematic diagram of a Manchester code receiving and decoding device that uses a memory to store the window size and data rate, as provided in an embodiment of this application;

[0045] Figure 5 A schematic diagram of a Manchester code receiving and decoding device that uses a rate detection module to determine the window size and data rate, provided for an embodiment of this application;

[0046] Figure 6 A schematic diagram of a window detection module provided in an embodiment of this application;

[0047] Figure 7 A schematic diagram illustrating a differential Manchester encoding processing method provided in an embodiment of this application;

[0048] Figure 8 This is a schematic diagram of a differential Manchester encoding data receiving and decoding device provided in an embodiment of this application. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some embodiments of this application, not all embodiments. The components of the embodiments of this application described in the accompanying drawings can generally be arranged and designed in various different configurations.

[0050] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0051] In the description of this application, it should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The term "connection" should be interpreted broadly, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium.

[0052] Existing Manchester encoding receiver decoding requires oversampling, necessitating high-frequency or multi-phase clocks, which incurs additional hardware costs in terms of power consumption and area. Decoding based on edge detection, on the other hand, suffers from insufficient reliability.

[0053] To overcome the above problems, this application provides a Manchester code receiving and decoding method, including:

[0054] S1. Receive valid data;

[0055] S2. Generate a detection clock signal based on the effective data transmission rate;

[0056] S3. Based on the detection clock signal, detect valid data within the detection window set on the time axis.

[0057] The detection window only partially covers the duration of valid data, not the entire duration (i.e., from beginning to end, from left to right), which contrasts sharply with existing technologies that cover the entire duration of valid data. Figure 1 In reality, although the transition requires a certain period of time, this period of time is very short. For example, each vertical small rectangle is very narrow, and it is enough to detect valid data by covering only this narrow part.

[0058] The beneficial effects of this application's embodiments can be observed: each set window corresponds to one valid data bit, avoiding the detection of too many or too dense windows, and also avoiding multiple windows detecting the same valid data bit, thus reducing hardware costs. It ensures reliability by sampling each bit without oversampling. This application's embodiments can guarantee the signal quality of the clock and the recovered data, reduce the bit error rate, and improve link reliability.

[0059] The detection clock signal plays a crucial role. The following describes two methods for generating the detection clock signal provided in this application.

[0060] The first method for detecting the generation of the clock signal is to set step S2-A before step S2:

[0061] S2-A. Generates a detection clock signal at a set frequency based on the effective data transfer rate stored in the register or non-volatile memory.

[0062] The second method for generating the detection clock signal involves setting the transmitted data in the form of a data header + valid data. That is, a data header precedes the valid data. Based on a pre-set protocol or rule, the period or frequency of the detection clock signal is obtained from the data header. Specifically, before step S2 or S1, step S1-A is set:

[0063] S1-A-1. Receive data header, the data header carrying transmission rate information of valid data;

[0064] S1-A-2. Parse the effective data transmission rate information in the data header (i.e., obtain the effective data transmission rate).

[0065] Then step S2 can be performed: generating a detection clock signal based on the effective data transmission rate.

[0066] At this point, step S3 can be based on the detection clock signal, after the data header on the time axis has been received, to detect valid data in the set detection window and obtain a detection result of 0 or 1.

[0067] In one embodiment, the data header includes a data header end identifier to indicate the end of the data header and the beginning of valid data.

[0068] In another embodiment, the data header uses a special encoding mechanism other than Manchester encoding, such as non-return-to-zero code, where a high level represents 1 and a low level represents 0.

[0069] In one embodiment, the transmission rate information of the valid data is carried by using the level duration in the data header. Figure 2 Several examples of data headers are given. In the diagram, 201 (the large dashed box on the left) represents the data header, 202 (the bit in the thick box within the data header) is the data header end marker, 203 (the large dashed box on the right) represents valid data, and the thick box 204 within the valid data represents the detection window. If an upward transition is detected within the detection window, this bit is 1; if a downward transition is detected, this bit is 0. No detection is performed outside the detection window.

[0070] In one embodiment, the data header adopts a clock encoding mode, that is, the data in the data header, except for the data header end marker, is periodically distributed with high and low levels, and the transmission rate information of the effective data is carried by the duration of each high or low level.

[0071] like Figure 2 (a) The data header is 101010100, with the last bit "0" indicating the end of the data header. The duration of any high or low level in the data header, excluding the end-of-header marker, is half the period of the Manchester code transmitted in the valid data. The period of the detection clock signal is the same as the period of the Manchester code transmitted in the valid data, and is also twice the duration of any high or low level in the data header, excluding the end-of-header marker.

[0072] like Figure 2 (b) The data header is 110011000, with a trailing "0" indicating the end of the data header. The duration of any high or low level in the data header, excluding the end-of-header marker, is the same as one time the period of the Manchester code transmitted in the valid data. The period of the detection clock signal is twice the period of the Manchester code transmitted in the valid data, and also twice the duration of any high or low level in the data header, excluding the end-of-header marker.

[0073] In other embodiments, the duration of any high or low level in the data header, excluding the header end identifier, can be set to an integer or non-integer multiple of the period of Manchester code transmitted in the valid data.

[0074] The header end identifier can be any other identifiable, pre-defined form that indicates the end of the header and the beginning of valid data. In one embodiment, the header end identifier is also used to carry header ID information. In another embodiment, the header end identifier is also used for data packet transmission and reception synchronization.

[0075] In one embodiment, the data header can also be in a non-clock-coded mode, for example, the data header is 111100001010, which is 4 units of high level + 4 units of low level + 1 unit of high level + 1 unit of low level + 1 unit of high level + 1 unit of low level. Then, based on the data header, the maximum value of the high level width is 4 units of time, and the minimum value of the low level width is 1 unit of time. The effective data transmission rate can be determined by the time-to-digital converter (TDC) based on the minimum value of the low level width, the minimum value of the high level width, etc.

[0076] In general, the data header is set to a fixed waveform, and an effective data transmission rate can be determined based on the time information extracted from the waveform.

[0077] The beneficial effects of including a data header can be observed: with a data header, the receiving decoding method can adapt to data transmission rates of different speeds, supporting the transmission of Manchester-coded data at variable data rates. Although the effective data transmission rate varies, the rate of subsequent effective data transmission can be determined based on the data header's transmission rate, allowing for bit-by-bit reading and avoiding oversampling. The data header can also have additional functions: it can assist in providing synchronization or frequency information for Manchester code receivers to perform frequency and phase calibration.

[0078] The transmission of Manchester-encoded data at variable data rates here can involve different data rates from different transmitting devices, or varying data rates from the same transmitting device. Data units can be set to a fixed length, with each unit containing a header and valid data. Alternatively, a transmitting device can be configured to periodically send headers, maintaining the same data rate as the previous header until the next header is sent.

[0079] To accommodate signals of varying strengths—for example, some strong signals may have a large voltage difference between their high and low levels, while others are weaker and have a smaller difference—an amplifier can be used to unify the voltage difference between the high and low levels into a stable voltage difference. In Manchester code reception and decoding methods, this can be configured as follows:

[0080] Step S1-A-1 includes determining the amplification factor based on the voltage difference between the high and low levels in the data header, and amplifying the signal in the data header.

[0081] Step S1 includes amplifying the signal of the effective data according to the amplification factor, and step S3 involves detecting the amplified effective data signal.

[0082] Therefore, signals of different strengths can be detected with equal reliability. The above steps can be summarized into a more effective implementation method as follows:

[0083] S1-A-1. Receive a data header, the data header including a high level and a low level, determine the amplification factor based on the voltage difference between the high level and the low level in the data header, and amplify the signal of the data header;

[0084] S1-A-2. Parse the valid data transmission rate information in the data header;

[0085] S1. Receive valid data, and amplify the signal of the valid data according to the amplification factor to obtain amplified valid data;

[0086] S2. Generate a detection clock signal based on the effective data transmission rate;

[0087] S3. Based on the detection clock signal, detect the magnified and processed valid data within the detection window set on the time axis.

[0088] Based on the above embodiments, this application also provides a Manchester code receiving and decoding apparatus. The Manchester code receiving and decoding method of this application can be used in a Manchester code receiving and decoding apparatus. Figure 3 The Manchester code receiving and decoding device 300 includes:

[0089] Clock module 301 is used to generate a detection clock signal based on the effective data transmission rate;

[0090] The window detection module 302 is used to receive valid data and detect valid data in a detection window set on the time axis according to the detection clock signal; wherein the detection window only partially covers the duration of the valid data.

[0091] The embodiments of this application can set the start and end time range of the detection window by setting the clock, which can easily extract the clock and data, and reduce hardware power consumption and area cost.

[0092] Corresponding to the first method of generating the detection clock signal described above, such as Figure 4 The register or non-volatile memory 303 can be configured to generate a detection clock signal at a set frequency. Specific functions can be configured as follows:

[0093] 1. The register or non-volatile memory 303 can store data rate information and send the data rate signal to the clock module 301. The clock module 301 generates a detection clock signal CLKIN and sends it to the window detection module 302.

[0094] 2. The register or non-volatile memory 303 can also store the definition of the detection window size, and can send the detection window size signal to the window detection module 302 so that the detection window detection module can detect valid data at a moment in the detection window or during the detection window time period according to the detection window size represented by the detection window size signal.

[0095] The register or non-volatile memory 303 can be located inside the Manchester code receiving and decoding device 300 or outside the Manchester code receiving and decoding device 300.

[0096] Figure 4The system also includes a header end-of-signal detection module 305, which can be used to detect header end-of-signal. When the header end-of-signal is detected, a header end-of-signal is sent to the clock module. Thus, the clock module can start working after receiving the header end-of-signal, meaning that the detection clock signal CLKIN will not be generated before the header end-of-signal is received, which can further reduce power consumption.

[0097] Corresponding to the method of generating the detection clock signal based on the data header parsing, such as Figure 5 The Manchester code receiving and decoding devices that can be configured include:

[0098] The rate detection module 306 is used to receive a data header, which carries the transmission rate information of valid data, and to parse the valid data transmission rate information in the data header.

[0099] At this time, the window detection module 302 is used to detect valid data in the set detection window after the data header on the time axis has been received according to the detection clock signal.

[0100] For the window detection module 302, it can be configured as follows: Figure 6 ,include:

[0101] The amplification module 3021 is used to determine the amplification factor based on the voltage difference between the high and low levels in the data header, amplify the signal of the valid data, and output the amplified signal.

[0102] The generation module 3022 is used to generate a clock trigger signal CLK based on the detected clock signal CLKIN;

[0103] The D flip-flop module 3023 is used to generate output data DATA OUT based on the clock trigger signal CLK and the amplified signal.

[0104] Since the D flip-flop module does not need to generate output data during the non-detection window period, and only needs to operate during the detection window period, the same applies to the amplification module. Therefore, the operation of the amplification module can be controlled by setting the enable signal EN.

[0105] Furthermore, if the D flip-flop receives the clock trigger signal CLK before the amplification module has output the latest amplified signal, an error may occur. To ensure that the D flip-flop module has completed its settings based on the latest amplified signal when it receives the clock trigger signal, the enable signal can be set to precede the clock trigger signal by a time Td. Specifically, it can be set as follows:

[0106] The amplification module 3021 is used to receive the enable signal EN, amplify the signal of the valid data under the enable condition, and output the amplified signal to the D flip-flop module 3023.

[0107] The generation module 3022 is used to generate a clock trigger signal CLK and an enable signal EN according to the detection clock signal and the detection window size. The enable signal EN is generated before the clock trigger signal CLK to ensure that when the D flip-flop module receives the clock trigger signal CLK, it has already been set according to the amplification signal. The enable signal can be at a low level during the non-detection window period of the effective data transmission process to control the amplification module to not work.

[0108] Since the amplifier module and the D flip-flop module do not operate when the enable signal EN is low, energy consumption can be further saved.

[0109] The above can be used as settings for Manchester encoding. For differential Manchester encoding, such as... Figure 7 After obtaining a series of detection results of 0 or 1, take adjacent bits of the results and perform an XOR operation on the adjacent bits to obtain the final output data.

[0110] That is, Figure 8 An XOR logic module 308 can be connected to the output of the window detection module 302 to perform an XOR operation on adjacent bits of the output of the window detection module 302, thereby obtaining the final output data DATA OUT.

[0111] In summary, this application proposes a method and apparatus for receiving and decoding Manchester codes, which can achieve low hardware cost and high reliability for receiving and decoding Manchester codes and differential Manchester codes.

[0112] The apparatus and system embodiments described above are merely illustrative. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement these embodiments without any creative effort.

[0113] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for receiving and decoding Manchester code, characterized in that, include: Receive valid data; Generate a detection clock signal based on the effective data transmission rate; According to the detection clock signal, valid data is detected within a detection window set on the time axis; wherein, the detection window only partially covers the duration of valid data; each detection window corresponds to 1 valid data bit; The steps for generating a detection clock signal based on the effective data transmission rate include: A detection clock signal with a set frequency is generated based on the effective data transfer rate stored in the register or non-volatile memory.

2. The Manchester code receiving and decoding method as described in claim 1, characterized in that, Before the step of generating a detection clock signal based on the effective data transmission rate, or before the step of receiving effective data, the method further includes: Receive a data header, which carries the transmission rate information of the valid data; Parse the valid data transmission rate information in the data header.

3. The Manchester code receiving and decoding method as described in claim 2, characterized in that, The data header includes a data header end identifier to indicate the end of the data header and the beginning of valid data.

4. The Manchester code receiving and decoding method as described in claim 3, characterized in that, The data header, excluding the end-of-header identifier, uses a periodic alternation of high and low levels, with the duration of each high or low level carrying the transmission rate information of the valid data.

5. The Manchester code receiving and decoding method as described in claim 2, characterized in that, The step of receiving the data header, which precedes the step of receiving valid data, includes: determining the amplification factor based on the voltage difference between the high and low levels in the data header, and amplifying the signal of the data header. The steps for receiving valid data include: amplifying the signal of the valid data according to the amplification factor.

6. A Manchester code receiving and decoding device, characterized in that, include: The clock module is used to generate a detection clock signal based on the effective data transmission rate; The window detection module is used to receive valid data and detect valid data within a detection window set on the time axis according to the detection clock signal; wherein the detection window only partially covers the duration of the valid data.

7. The Manchester code receiving and decoding apparatus as described in claim 6, characterized in that, The Manchester code receiving and decoding device also includes: Registers or non-volatile memory are used to store the effective data transfer rate; The clock module is used to generate a detection clock signal at a set frequency based on the effective data transfer rate stored in the register or non-volatile memory.

8. The Manchester code receiving and decoding apparatus as described in claim 6, characterized in that, The Manchester code receiving and decoding device also includes: The rate detection module is used to receive a data header, which carries the transmission rate information of valid data, and to parse the valid data transmission rate information in the data header.

9. The Manchester code receiving and decoding apparatus as described in claim 8, characterized in that, The window detection module includes: An amplification module is used to determine the amplification factor based on the voltage difference between the high and low levels in the data header, amplify the signal of the valid data, and output an amplified signal. The generation module is used to generate a clock trigger signal and an enable signal based on the detected clock signal; The D flip-flop module is used to generate output data based on the clock trigger signal and the amplified signal.

10. The Manchester code receiving and decoding apparatus as described in claim 9, characterized in that, The amplification module is used to receive an enable signal, amplify the signal of the valid data under the enable condition, and output the amplified signal to the D flip-flop module. The generation module is used to generate a clock trigger signal and an enable signal according to the detection clock signal and the detection window size. The enable signal is ahead of the clock trigger signal to ensure that the D flip-flop module has already completed the settings according to the amplification signal when it receives the clock trigger signal.

Citation Information

Patent Citations

  • Receiver for Manchester encoded data

    US4862482A