Method for collecting and decoding Manchester coded signals

Through the double-rate acquisition method and duty cycle analysis method, the acquisition error problem in Manchester signal decoding is solved, and the accuracy of signal acquisition and the reliability of data communication is improved.

CN119921781AActive Publication Date: 2025-05-02WUHAN LINGJIU MICROELECTRONICS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411981361.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

During the decoding process of Manchester signal, if the duty cycle of the reply signal is inaccurate and there is no edge detection mechanism, acquisition errors are prone to occur, resulting in inaccurate signal acquisition.

Method used

The double-rate acquisition method is used to continuously collect Manchester encoded signal data. By analyzing the waveform and duty cycle characteristics of the data, the data is allocated to a high and low level half cycle and decoded.

Benefits of technology

It improves the accuracy of Manchester signal acquisition, reduces bit bit deviation, reduces data communication errors, and does not require hardware device interruption related requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119921781A_ABST
    Figure CN119921781A_ABST
Patent Text Reader

Abstract

The invention provides a Manchester coded signal acquisition and decoding method, which comprises the following steps: S1, sending a signal decoding request to slave equipment, and waiting for Manchester coded signal data replied by the slave equipment; s2, continuously acquiring Manchester coded signal data replied by the slave equipment by adopting a double-rate acquisition method; s3, the waveform of the collected Manchester encoding signal data is analyzed and processed, and the duty ratio characteristic of the Manchester encoding signal data is obtained; s4, distributing a plurality of Manchester coded signal data acquired in an acquisition period to a high-level half period and a low-level half period of the acquisition period according to duty ratio characteristics; and S5, decoding the acquired Manchester encoding signal data to obtain decoded data. According to the difference of the duty ratio of the reply signal, deviation correction is carried out on the collected data within a certain range, the problem of data errors only collected in a time sequence state is solved, and the accuracy of data decoding is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of coding and decoding, and more specifically, to a method for collecting and decoding Manchester coded signals. Background Art

[0002] Manchester coding technology, as a synchronous clock coding technology, each data bit is represented by at least one voltage conversion. It can encode any binary data without level jump for a long time. It has good synchronization function and anti-interference ability, and is often used in encrypted communication or network security transmission. However, in the decoding process of Manchester signal, if the duty cycle of the reply signal is inaccurate and there is no edge detection mechanism, it is easy to cause acquisition error, resulting in inaccurate signal acquisition.

[0003] For Manchester decoders, it is necessary to rely on hardware interrupts to obtain the level transition edge in the cycle, or to accurately respond to the signal periodically without clock interference. Otherwise, when a large amount of data is collected and communicated, bit deviations are likely to occur, resulting in data communication errors. Summary of the invention

[0004] The present invention aims at the technical problems existing in the prior art and provides a method for collecting and decoding Manchester coded signals, which can solve the problem that in the decoding process of Manchester signals, if the duty cycle of the reply signal is inaccurate and there is no edge detection mechanism, collection errors are likely to occur, resulting in inaccurate signal collection.

[0005] The present invention provides a method for collecting and decoding Manchester coded signals, comprising:

[0006] S1, sending a decoding signal request to a slave device, and waiting for Manchester encoded signal data replied by the slave device;

[0007] S2, continuously collecting the Manchester coded signal data replied by the slave device by using a double rate collection method until the Manchester coded signal data reply is completed;

[0008] S3, analyzing and processing the waveform of the collected Manchester coded signal data to obtain the duty cycle characteristics of the Manchester coded signal data;

[0009] S4, according to the duty cycle characteristics, allocating a plurality of Manchester coded signal data collected in one collection period to a high level half period and a low level half period of the collection period;

[0010] S5, decoding the collected Manchester coded signal data to obtain decoded data.

[0011] Based on the above technical solution, the present invention can also make the following improvements.

[0012] Optionally, the Manchester coded signal data represents bits 0 and 1 by changes in high and low levels. If the level jumps from high to low, the bit is represented as "1", and if the level jumps from low to high, the bit is represented as "0". Each bit of the Manchester coded signal data corresponds to an acquisition cycle of the code.

[0013] Optionally, the step S2, using a double rate acquisition method to continuously acquire the Manchester coded signal data replied by the slave device until the Manchester coded signal data reply ends, includes:

[0014] A double rate acquisition method is adopted to increase the number of Manchester coded signal data collected from the slave device. The number of Manchester coded signal data collected in one acquisition cycle is 3 to 5 times, and the number of Manchester coded signal data collected in the high level half cycle and the low level half cycle of one acquisition cycle is greater than or equal to 1.

[0015] Optionally, before valid Manchester coded signal data is collected, a GPIO pin of the sampling circuit is set to be in a high impedance state, the level state of the GPIO pin is determined by the pull-up and pull-down resistors, and when the level signal of the GPIO pin starts to change, the valid Manchester coded signal data replied by the slave device is collected, wherein the Manchester coded signal data includes a synchronization header + a valid data segment + a synchronization end;

[0016] When the collected Manchester coded signal data value does not change in level for more than two collection cycles, the collection of the Manchester coded signal data for this reply is terminated.

[0017] Optionally, also include:

[0018] The host computer processor opens up a temporary area as a data area to store the collected Manchester coded signal data;

[0019] The collected Manchester coded signal data is stored in the data area.

[0020] Optionally, the step S3, analyzing and processing the collected waveform of the Manchester coded signal data to obtain a duty cycle characteristic of the Manchester coded signal data, includes:

[0021] Statistically collect the waveform of the Manchester coded signal data, and the number of high levels and low levels in each collection period to obtain the duty cycle characteristics of the Manchester coded signal data, wherein the duty cycle characteristics of the Manchester coded signal data are that the high-low level duty cycle is greater than 1 or the high-low level duty cycle is less than 1, the high-low level duty cycle is greater than 1 means that the high level recovery time is greater than the low level time, and the high-low level duty cycle is less than 1 means that the low level recovery time is greater than the high level recovery time;

[0022] The duty ratio of the high and low levels is adjusted to be close to 1 by adjusting the pull-up and pull-down resistors in the sampling circuit.

[0023] Optionally, when the high-low level duty cycle is greater than 1, S4, according to the duty cycle characteristic, distributes a plurality of Manchester coded signal data collected in one collection cycle to a high level half cycle and a low level half cycle of the collection cycle, including:

[0024] S4.1, when the collected Manchester coded signal data changes periodically, it indicates that the Manchester coded signal data has started to be collected;

[0025] S4.2, when the Manchester coded signal data collected at the beginning is 0, continue to collect data until the collected level signal changes or the number of collections is greater than 3 times, and then skip the collection of the low-level signal in the previous half cycle;

[0026] S4.3, at this time, the high-level signal of the second half cycle is collected, and the signal collection is divided into the following situations:

[0027] S4.3.1, when collecting four high-level signals continuously, after collecting two high-level signals, quit collecting the high-level signal;

[0028] S4.3.2, when the number of low-level signals collected continuously in the first half cycle is two, then when the number of high-level signals collected is two, the collection of the high-level signal is skipped;

[0029] S4.3, if the Manchester coded signal data collected at the beginning is 1, when the collected level signal changes, the signal collection of this half cycle is skipped.

[0030] Optionally, when the high-low level duty cycle is less than 1, S4, according to the duty cycle characteristic, distributes a plurality of Manchester coded signal data collected in one collection cycle to the high level half cycle and the low level half cycle of the collection cycle, including:

[0031] S4.1', when the collected Manchester coded signal data changes periodically, it indicates that the collection of Manchester coded signal data has started;

[0032] S4.2', when the Manchester coded signal data collected at the beginning is 1, continue to collect data until the collected level signal changes or the number of collections is greater than 3 times, and then skip the collection of the high level signal of this half cycle;

[0033] S4.3', at this time, the low-level signal of the second half cycle is collected, and the signal collection is divided into the following situations:

[0034] S4.3.1', when collecting four low levels continuously, after collecting two low levels, quit collecting the low level signal;

[0035] S4.3.2', when the number of high-level signals collected continuously in the first half cycle is 2, then when the number of low-level signals collected is 2, the collection of the low-level signals is skipped;

[0036] S4.3', if the Manchester coded signal data collected at the beginning is 0, when the collected level signal changes, the signal collection of this half cycle is skipped.

[0037] Optionally, the step S5, decoding the collected Manchester coded signal data to obtain decoded data, includes:

[0038] Compare the Manchester coded signal data in a collection cycle with the previous and next half cycles. When the signal changes from high to low from the previous half cycle to the next half cycle, the decoded data is 0; otherwise, the decoded data is 1.

[0039] All decoded data are combined bit by bit, and the matching synchronization header and synchronization end data are removed to obtain the decoded data.

[0040] The present invention provides a Manchester coded signal acquisition and decoding method, combined with a double rate acquisition method, to ensure that the high and low level changes in each acquisition cycle can be acquired, send a request reply signal to the slave device, and then start to collect and wait for data reply. After the data acquisition is completed, the decoding process confirms the acquisition ratio of the high and low levels in the cycle according to the size of the duty cycle. According to the difference in the duty cycle of the reply signal, the system can correct the deviation of the collected data within a certain range. The present invention adopts a double rate acquisition method to collect signal data, with a fast acquisition rate and a simple implementation principle. The acquisition accuracy can be improved by more than 20%, and no hardware device interruption related requirements are required. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A flow chart of a method for collecting and decoding Manchester coded signals provided by the present invention;

[0042] Figure 2 It is a schematic diagram of the interaction between the processor in the host computer and the slave device. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0044] The present invention discloses a method for collecting and decoding Manchester coded signals. First, the processor sends a request signal according to the demand; then the collection of the reply signal is started at a double rate; the duty cycle characteristics are confirmed according to the high and low levels of the reply signal; then the duty cycle characteristics of the reply signal are used to decode the read binary data to obtain the required data. The present invention proposes a method for improving the decoding accuracy of non-standard Manchester signals; the data collection accuracy is high, the speed is fast, the error rate is low, and the processor principle is simple, the space occupied is small, and the hardware conditions required for operation are low.

[0045] Figure 1 A flow chart of a Manchester coded signal acquisition and decoding method provided by the present invention, such as Figure 1 As shown, the method includes:

[0046] S1, sending a decoding signal request to a slave device, and waiting for Manchester encoded signal data replied by the slave device.

[0047] It is understandable that when the host computer needs the device to communicate, it sends a start character that can be recognized by the slave device and starts waiting to collect signal data replied by the slave device.

[0048] S2, continuously collecting the Manchester coded signal data replied by the slave device by using a double rate collection method until the Manchester coded signal data reply is completed.

[0049] It is understandable that the signal data replied from the device is encoded in Manchester mode. Manchester encoding represents the 0 and 1 of the bit by the change of high and low levels. The middle level of the bit jumps from high to low to represent "1", and from low to high to represent "0". Each bit corresponds to a collection cycle of the code.

[0050] Since there is no interrupt mechanism when the processor of the host computer collects the returned Manchester coded signal. Therefore, how to correctly collect the signal according to the timing is a key issue. The present invention proposes a double-rate acquisition method to collect the returned Manchester coded signal, increase the number of acquisitions, and better reduce the loss of collected data. That is, in one acquisition cycle, it is planned to collect data 4 times, and the number of high and low levels is 2 times each. However, due to the influence of the duty cycle error, the cycle of the returned Manchester coded signal is not standard, and the data collected in one acquisition cycle will change within 3 to 5 times.

[0051] The processor of the host computer collects the Manchester coded signal data replied by the slave device through the sampling circuit. The schematic diagram of the interaction between the processor and the slave device can be seen in Figure 2 Before collecting the valid Manchester coded signal replied by the slave device, the GPIO pin of the sampling circuit is in high impedance state, and the level state of the GPIO pin is determined by the pull-up and pull-down resistors. When the processor waits for the Manchester coded signal data replied by the slave device, the high and low levels of the GPIO pin remain unchanged. When the level signal of the GPIO pin begins to change, it means that the slave device begins to reply with valid Manchester coded signal data, where the Manchester coded signal data includes synchronization header + valid data segment + synchronization end.

[0052] When the collected Manchester coded signal data value does not change in level for more than two cycles, it means that the collection of this reply signal has ended.

[0053] The host computer processor opens a temporary area to store the collected data. Each cycle collects twice the amount of data of the high and low levels, so the data area must be opened for at least twice the length of the cycle, and the synchronization header, synchronization end part, and the margin left for collection must also be considered. The processor stores the continuously collected Manchester coded signal data in the opened temporary area.

[0054] S3, analyzing and processing the collected waveform of the Manchester coded signal data to obtain the duty cycle characteristics of the Manchester coded signal data.

[0055] Among them, the duty cycle characteristics of the recovered Manchester coded signal data waveform are analyzed by observation or data comparison. Specifically, the waveform of the Manchester coded signal data collected is statistically analyzed, and the number of high and low levels in each acquisition cycle is used to obtain the duty cycle characteristics of the Manchester coded signal data, wherein the duty cycle characteristics of the Manchester coded signal data are high and low level duty ratios>1 or high and low level duty ratios less than 1, and the high and low level duty ratios>1 means that the high level recovery time is longer than the low level time, and the high and low level duty ratios less than 1 means that the low level recovery time is longer than the high level recovery time. The duty cycle of the recovered Manchester coded signal data is controlled within the range of a reasonable signal by adjusting the hardware. Specifically, the high and low level duty ratios are adjusted to be close to 1 by adjusting the pull-up and pull-down resistors in the sampling circuit.

[0056] S4, according to the duty cycle characteristics, allocating a plurality of Manchester coded signal data collected in one collection period to a high level half period and a low level half period of the collection period.

[0057] It is understandable that according to the duty cycle characteristics of the Manchester coded signal data replied by the slave device analyzed in step 3, the 3 to 5 data collected in one cycle are allocated in the high and low level half cycles, so as to decide when to jump out of the cycle collection.

[0058] Among them, (1) when the high-level and low-level duty cycle range is greater than 1, the high-level acquisition ratio is greater than the low-level ratio; at this time, more attention should be paid to the acquisition of high-level signals to prevent the impact on the acquisition of the next cycle signal.

[0059] When entering the level signal acquisition, if the low level signal is acquired first, the following level situations may occur within the cycle (under the standard double rate acquisition method, data will be collected 4 times in one cycle): 011 0111100 00111100 0011100

[0064] For the above-mentioned level conditions, the following methods are used for collection and distribution:

[0065] S4.1, when the collected Manchester coded signal data changes periodically, it indicates that the Manchester coded signal data has started to be collected;

[0066] S4.2, when the Manchester coded signal data collected at the beginning is 0, continue to collect data until the collected level signal changes or the number of collections is greater than 3 times, and then skip the collection of the low-level signal in the previous half cycle;

[0067] S4.3, at this time, the high-level signal of the second half cycle is collected, and the signal collection is divided into the following situations:

[0068] S4.3.1, when collecting four high-level signals continuously, after collecting two high-level signals, quit collecting the high-level signal;

[0069] S4.3.2, when the number of low-level signals collected continuously in the current half cycle is two, then when the number of high-level signals collected is two, the collection of this high-level signal is skipped.

[0070] S4.3, if the Manchester coded signal data collected at the beginning is 1, when the collected level signal changes, the signal collection of this half cycle is skipped.

[0071] Among them, S4.2 and S4.3 are data acquisition methods when the Manchester coded signal data just collected is 0, and S4.3 is the acquisition method when the Manchester coded signal data just collected is 1. At this time, it is only necessary to divide the signal acquisition of the high and low level half cycles according to the jump of the level signal. For example, when the level signal collected in the current half cycle is a high level, the following situations may occur. At this time, there is no need to jump out of the signal acquisition in the cycle in advance. 110011 1110011 111011

[0075] (2) When the high-low level duty cycle characteristic is less than, the proportion of low-level acquisition signals is greater than the proportion of high-level signal acquisition, then more attention should be paid to the acquisition of low-level signals, and its acquisition method is opposite to the acquisition method when the high-low level duty cycle is greater than 1. Specifically, it includes:

[0076] S4.1', when the collected Manchester coded signal data changes periodically, it indicates that the collection of Manchester coded signal data has started;

[0077] S4.2', when the Manchester coded signal data collected at the beginning is 1, continue to collect data until the collected level signal changes or the number of collections is greater than 3 times, and then skip the collection of the high level signal of this half cycle;

[0078] S4.3', at this time, the low-level signal of the second half cycle is collected, and the signal collection is divided into the following situations:

[0079] S4.3.1', when collecting four low levels continuously, after collecting two low levels, quit collecting the low level signal;

[0080] S4.3.2', when the number of high-level signals collected continuously in the first half cycle is 2, then when the number of low-level signals collected is 2, the collection of the low-level signals is skipped;

[0081] S4.3', if the Manchester coded signal data collected at the beginning is 0, when the collected level signal changes, the signal collection of this half cycle is skipped.

[0082] Among them, S4.2' and S4.3' are data acquisition methods when the Manchester coded signal data just acquired is 1, and S4.3' is the acquisition method when the Manchester coded signal data just acquired is 0. At this time, it is only necessary to divide the signal acquisition into half cycles of high and low levels according to the jump of the level signal.

[0083] It should be noted that the traditional acquisition division method is to divide the signal acquisition of the high and low level cycles only according to the jump of the level, so there will be a problem of division error. It is very likely that the signal that should be divided into the next cycle will be divided into the current cycle, which will eventually cause Manchester decoding errors. The acquisition method of the present invention improves the accuracy of Manchester decoding signals.

[0084] S5, decoding the collected Manchester coded signal data to obtain decoded data.

[0085] It can be understood that the principle of decoding Manchester signal data is: compare the Manchester encoded signal data in a collection cycle with the front and back half cycles. When the signal changes from high to low from the front half cycle to the second half cycle, the decoded data is 0; otherwise, the decoded data is 1; all the decoded data are bit-combined, and the matching synchronization header and synchronization end data are removed to obtain the decoded data.

[0086] In the process of decoding Manchester coded signal data, when an error occurs in the forward decoding of the collected Manchester coded signal data, the Manchester coded signal is reversely checked. Specifically, the Manchester coded signal data is reversely decoded, and the forward decoded data sequence and the reverse decoded data sequence are compared to determine the position of the decoding error.

[0087] For the Manchester coded signal data that is decoded incorrectly, multiple acquisitions and forward decoding are performed, and for each forward decoded data sequence, a voting method is used to determine the correct decoded data sequence. For example, each segment of the Manchester coded signal data is acquired 5 times, and the data that appears most frequently in these 5 votes is selected as the correct data of the data bit.

[0088] The Manchester coded signal acquisition and decoding method provided by the embodiment of the present invention is combined with the double rate acquisition method to ensure that the high and low level changes in each acquisition cycle can be acquired, and a request reply signal is sent to the slave device to start the acquisition and wait for the data reply. After the data acquisition is completed, the decoding process confirms the acquisition ratio of the high and low levels in the cycle according to the size of the duty cycle. According to the difference in the duty cycle of the reply signal, the system can correct the deviation of the collected data within a certain range. The present invention adopts the double rate acquisition method to collect signal data, the acquisition rate is fast, and the implementation principle is simple. The acquisition accuracy can be improved by more than 20%, and there is no need for hardware device interruption related requirements.

[0089] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0090] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0091] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0092] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0094] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0095] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for collecting and decoding Manchester coded signals, characterized in that: include: S1, sending a decoding signal request to a slave device, and waiting for Manchester encoded signal data replied by the slave device; S2, continuously collecting the Manchester coded signal data replied by the slave device by using a double rate collection method until the Manchester coded signal data reply is completed; S3, analyzing and processing the waveform of the collected Manchester coded signal data to obtain a duty cycle characteristic of the Manchester coded signal data; S4, according to the duty cycle characteristics, allocating a plurality of Manchester coded signal data collected in one collection period to a high level half period and a low level half period of the collection period; S5, decoding the collected Manchester coded signal data to obtain decoded data.

2. The method for collecting and decoding Manchester coded signals according to claim 1, characterized in that: The Manchester coded signal data represents the bit 0 and 1 by the change of high and low levels. If the level jumps from high to low, the bit is represented as "1", and if the level jumps from low to high, the bit is represented as "0". Each bit of the Manchester coded signal data corresponds to an acquisition cycle of the code.

3. The method for collecting and decoding Manchester coded signals according to claim 2, characterized in that: The step S2, using a double rate acquisition method to continuously acquire the Manchester coded signal data replied by the slave device until the Manchester coded signal data reply is completed, includes: A double rate acquisition method is adopted to increase the number of Manchester coded signal data collected from the slave device. The number of Manchester coded signal data collected in one acquisition cycle is 3 to 5 times, and the number of Manchester coded signal data collected in the high level half cycle and the low level half cycle of one acquisition cycle is greater than or equal to 1.

4. The method for collecting and decoding Manchester coded signals according to claim 3, characterized in that: Before collecting valid Manchester coded signal data, set the GPIO pin of the sampling circuit to be in a high impedance state, the level state of the GPIO pin is determined by the pull-up and pull-down resistors, and when the level signal of the GPIO pin starts to change, start collecting valid Manchester coded signal data replied from the device, wherein the Manchester coded signal data includes a synchronization header + a valid data segment + a synchronization end; When the collected Manchester coded signal data value does not change in level for more than two collection cycles, the collection of the Manchester coded signal data for this reply is terminated.

5. The method for collecting and decoding Manchester coded signals according to claim 4, characterized in that: Also includes: The host computer processor opens up a temporary area as a data area to store the collected Manchester coded signal data; The collected Manchester coded signal data is stored in the data area.

6. The method for collecting and decoding Manchester coded signals according to claim 1, characterized in that: The step S3, analyzing and processing the waveform of the collected Manchester coded signal data to obtain the duty cycle characteristics of the Manchester coded signal data, includes: The waveform of the Manchester coded signal data collected is statistically analyzed, and the number of high levels and low levels in each collection cycle is used to obtain the duty cycle characteristics of the Manchester coded signal data, wherein the duty cycle characteristics of the Manchester coded signal data are that the high-low level duty cycle is greater than 1 or the high-low level duty cycle is less than 1, and the high-low level duty cycle is greater than 1, which means that the high level collection ratio in one collection cycle is greater than the low level collection ratio, and the high-low level duty cycle is less than 1, which means that the low level collection ratio in one collection cycle is greater than the high level collection ratio; The duty ratio of the high and low levels is adjusted to be close to 1 by adjusting the pull-up and pull-down resistors in the sampling circuit.

7. The method for collecting and decoding Manchester coded signals according to claim 6, characterized in that: When the high-low level duty ratio is greater than 1, the step S4, according to the duty ratio characteristic, distributes the multiple Manchester coded signal data collected in one collection cycle to the high level half cycle and the low level half cycle of the collection cycle, including: S4.1, when the collected Manchester coded signal data changes periodically, it indicates that the Manchester coded signal data has started to be collected; S4.2, when the Manchester coded signal data collected at the beginning is 0, continue to collect data until the collected level signal changes or the number of collections is greater than 3 times, and then skip the collection of the low-level signal in the previous half cycle; S4.3, at this time, the high-level signal of the second half cycle is collected, and the signal collection is divided into the following situations: S4.3.1, when collecting four high-level signals continuously, after collecting two high-level signals, quit collecting the high-level signal; S4.3.2, when the number of low-level signals collected continuously in the first half cycle is two, then when the number of high-level signals collected is two, the collection of the high-level signal is skipped; S4.3, if the Manchester coded signal data collected at the beginning is 1, when the collected level signal changes, the signal collection of this half cycle is skipped.

8. The method for collecting and decoding Manchester coded signals according to claim 6, characterized in that: When the high-low level duty ratio is less than 1, the step S4, according to the duty ratio characteristic, distributes the multiple Manchester coded signal data collected in one collection cycle to the high level half cycle and the low level half cycle of the collection cycle, including: S4.1', when the collected Manchester coded signal data changes periodically, it indicates that the collection of Manchester coded signal data has started; S4.2', when the Manchester coded signal data collected at the beginning is 1, continue to collect data until the collected level signal changes or the number of collections is greater than 3 times, and then skip the collection of the high level signal of this half cycle; S4.3', at this time, the low-level signal of the second half cycle is collected, and the signal collection is divided into the following situations: S4.3.1', when collecting four low levels continuously, after collecting two low levels, quit collecting the low level signal; S4.3.2', when the number of high-level signals collected continuously in the first half cycle is 2, then when the number of low-level signals collected is 2, the collection of the low-level signals is skipped; S4.3', if the Manchester coded signal data collected at the beginning is 0, when the collected level signal changes, the signal collection of this half cycle is skipped.

9. The method for collecting and decoding Manchester coded signals according to claim 1, characterized in that: The step S5, decoding the collected Manchester coded signal data to obtain decoded data, comprises: Compare the Manchester coded signal data in a collection cycle with the previous and next half cycles. When the signal changes from high to low from the previous half cycle to the next half cycle, the decoded data is 0; otherwise, the decoded data is 1. All decoded data are combined bit by bit, and the matching synchronization header and synchronization end data are removed to obtain the decoded data.

10. The method for collecting and decoding Manchester coded signals according to claim 9, characterized in that: The step S5, decoding the collected Manchester coded signal data to obtain decoded data, further comprises: When an error occurs in the forward decoding of the collected Manchester coded signal data, reverse decoding is performed on the Manchester coded signal data, and the forward decoded data sequence and the reverse decoded data sequence are compared to determine the position of the decoding error; For the Manchester coded signal data with decoding errors, multiple acquisitions and forward decoding are performed, and for each forward decoded data sequence, a voting method is used to determine the correct decoded data sequence.

Citation Information

Patent Citations

  • Data decoding method, data decoder using the same

    CN101223709A

  • Manchester encoding signal decoding method and device

    CN105187070A

  • Method for realizing 1553B bus communication protocol through power line

    CN116016013A

  • AUX channel signal simulation method based on GPIO

    CN117667773A

  • Manchester code decoding apparatus

    US4317211A