Manchester decoding system and decoding method
By designing a Manchester decoding system containing multiple counting and comparison units, the complex problem of decoding synchronization in the prior art is solved, fast and stable data analysis is achieved, and the efficiency of the processor chip and the scope of use of Manchester encoded communication are improved.
Patent Information
- Application Number
- CN202411974778.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the existing Manchester decoding technology, the receiver needs to extract the sending clock and keep it synchronized with the sending clock, otherwise the data will not be correctly parsed, and the circuit implementation of the existing method is complex, which limits the scope of use of Manchester encoded communication.
A Manchester decoding system is designed, including a system clock, a synchronization unit, a low-level counting unit, a high-level counting unit, a counting memory unit, a counting comparison unit, a maximum value memory unit, a low-level comparison unit, a high-level comparison unit and a data analysis unit. Through the coordinated work of these units, data in the Manchester code stream can be quickly and stably parsed.
The system can quickly and stably analyze communication data using simple and effective digital circuits, improve the efficiency of the processor chip, and expand the scope of use of Manchester coded communication.
Smart Images

Figure CN119382712B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of Manchester decoding, and in particular relates to a Manchester decoding system and a decoding method. Background Art
[0002] With the development of processor chips, the internal peripherals (such as the four-channel digital filter SDFM) and external chips (such as the analog-to-digital converter ADC) will use Manchester coding for communication. Manchester coding can quickly and stably parse the communication data and improve the efficiency of the processor chip.
[0003] In the existing Manchester decoding technology, the receiving end needs to extract the communication clock and keep it synchronized with the sending end's clock, otherwise the data cannot be correctly parsed. Generally, filtering method and digital phase-locked loop method are used to extract the sending clock, such as Figure 1 As shown, the data is parsed by extracting the transmission clock. The narrowband filter used in the filtering method is not suitable for digital circuits, and the circuit implementation of the digital phase-locked method is too complicated. This severely limits the scope of use of Manchester coded communication and poses a challenge to the application scenarios of chip peripherals (such as SDFM). Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a Manchester decoding system and a decoding method, so as to achieve the purpose of quickly and stably parsing communication data and improving the efficiency of the processor chip.
[0005] To achieve the above object, the technical solution of the present invention is as follows:
[0006] A Manchester decoding system comprises a system clock, a synchronization unit, a low-level counting unit, a high-level counting unit, a counting storage unit, a counting comparison unit, a maximum value storage unit, a low-level comparison unit, a high-level comparison unit and a data analysis unit;
[0007] The system clock is provided by the processor chip system and is used for counting.
[0008] The synchronization unit: uses the system clock to synchronize the input Manchester code stream, and sends the synchronized Manchester code stream to the low-level counting unit and the high-level counting unit;
[0009] The low-level counting unit counts the low-level signals in the synchronized Manchester code stream using the beat of the system clock, that is, counts the duration of each low level and sends it to the counting storage unit, the counting comparison unit and the low-level comparison unit;
[0010] The high level counting unit counts the high level signals in the synchronized Manchester code stream using the beat of the system clock, that is, counts the duration of each high level and sends it to the high level comparison unit;
[0011] The counting storage unit stores the count of the previous low level for use by the following counting comparison unit;
[0012] The counting comparison unit compares the magnitudes of the two low-level count values before and after. If 3 / 4 of the larger count value is still greater than the smaller count value, the comparison is successful. Otherwise, the comparison continues. The counting comparison unit has a feedback system, which continuously compares the new maximum value with the previously counted maximum value to generate a more accurate maximum value.
[0013] The maximum value storage unit is used to store the maximum count value of the successful comparison for use by the subsequent low level comparison unit and high level comparison unit;
[0014] The low level comparison unit compares the low level count value sent by the low level counting unit with the maximum value sent by the maximum value storage unit. If the low level count value is greater than 3 / 4 of the maximum value, it indicates that a long low level is detected.
[0015] The high level comparison unit compares the high level count value sent by the high level counting unit with the maximum value sent by the maximum value storage unit. If the high level count value is greater than 3 / 4 of the maximum value, it indicates that a long high level is detected.
[0016] The data analysis unit decodes valid communication data according to the long low level, long high level and falling edge and rising edge in the Manchester code stream detected by the previous unit and in combination with the Manchester coding rule.
[0017] In the above scheme, the Manchester encoding rule is as follows: when a long high level appears in the code stream, it indicates that the transmission is data 0; when a long low level appears in the code stream, it indicates that the transmission is data 1; when a falling edge appears after a long high level in the code stream, it indicates that data 1 is transmitted; when a rising edge appears after a long low level in the code stream, it indicates that data 0 is transmitted.
[0018] A Manchester decoding method, using a Manchester decoding system as described above, comprises the following steps:
[0019] (1) The processor chip system provides the system clock and sends it to the synchronization unit, low-level counting unit, and high-level counting unit;
[0020] (2) The synchronization unit uses the system clock to synchronize the input Manchester code stream and sends the synchronized Manchester code stream to the low-level counting unit and the high-level counting unit;
[0021] (3) The low-level counting unit uses the beat of the system clock to count the low-level signals in the synchronized Manchester code stream, that is, to count the duration of each low level and send it to the counting storage unit, the counting comparison unit and the low-level comparison unit;
[0022] The high-level counting unit uses the beat of the system clock to count the high-level signals in the synchronized Manchester code stream, that is, to count the duration of each high level and send it to the high-level comparison unit;
[0023] (4) The counting comparison unit compares the magnitude of the two low-level count values before and after. If 3 / 4 of the larger count value is still greater than the smaller count value, the comparison is successful. Otherwise, the comparison continues. The new maximum value is continuously compared with the previously counted maximum value through the feedback system to generate a more accurate maximum value and send it to the maximum value storage unit.
[0024] (5) The low level comparison unit compares the low level count value sent by the low level counting unit with the maximum value sent by the maximum value storage unit. If the low level count value is greater than 3 / 4 of the maximum value, it means that a long low level is detected;
[0025] The high level comparison unit compares the high level count value sent by the high level counting unit with the maximum value sent by the maximum value storage unit. If the high level count value is greater than 3 / 4 of the maximum value, it means that a long high level is detected.
[0026] (6) The data parsing unit decodes the valid communication data according to the long low level, long high level and falling edge and rising edge in the Manchester code stream detected by the previous unit and the Manchester coding rules.
[0027] Through the above technical solution, a Manchester decoding system and decoding method provided by the present invention have the following beneficial effects:
[0028] The present invention utilizes a low-level counting unit, a high-level technical unit and a counting comparison unit to construct a Manchester decoding system according to the Manchester decoding rule. The system can use a simple and effective digital circuit to parse the communication data, quickly and stably parse the communication data, output effective decoding data, improve the efficiency of the processor chip, and increase the use range of peripherals using Manchester coding communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0030] Figure 1 It is a schematic diagram of the Manchester decoding process in the prior art;
[0031] Figure 2 A schematic diagram of a Manchester decoding system disclosed in an embodiment of the present invention;
[0032] Figure 3 Schematic diagram of Manchester code stream of an embodiment. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0034] The present invention provides a Manchester decoding system, such as Figure 2 As shown, it includes a system clock, a synchronization unit, a low-level counting unit, a high-level counting unit, a counting storage unit, a counting comparison unit, a maximum value storage unit, a low-level comparison unit, a high-level comparison unit and a data parsing unit.
[0035] System clock: A clock provided by the processor chip system for counting.
[0036] Synchronization unit: uses the system clock to synchronize the input Manchester code stream, and sends the synchronized Manchester code stream to the low-level counting unit and the high-level counting unit.
[0037] Low-level counting unit: Use the beat of the system clock to count the low-level signals in the synchronized Manchester code stream, that is, count the duration of each low level and send it to the counting storage unit, the counting comparison unit and the low-level comparison unit.
[0038] High-level counting unit: uses the beat of the system clock to count the high-level signals in the synchronized Manchester code stream, that is, counts the duration of each high level and sends it to the high-level comparison unit.
[0039] Counting storage unit: stores the count of the previous low level for use by the subsequent counting comparison unit.
[0040] Counting comparison unit: compares the size of the two low-level count values before and after. If 3 / 4 of the large count value is still greater than the small count value, the comparison is successful, otherwise the comparison continues; the counting comparison unit has a feedback system, which will continuously compare the new maximum value with the previously counted maximum value to generate a more accurate maximum value.
[0041] Maximum value storage unit: saves the maximum count value of successful comparison for use by the subsequent low-level comparison unit and high-level comparison unit.
[0042] Low level comparison unit: compares the low level count value sent by the low level counting unit with the maximum value sent by the maximum value storage unit. If the low level count value is greater than 3 / 4 of the maximum value, it means that a long low level is detected.
[0043] High level comparison unit: compares the high level count value sent by the high level counting unit with the maximum value sent by the maximum value storage unit. If the high level count value is greater than 3 / 4 of the maximum value, it means that a long high level is detected.
[0044] Data parsing unit: According to the long low level, long high level and falling edge and rising edge in Manchester code stream detected by the previous unit, combined with Manchester coding rules, the valid communication data is decoded.
[0045] The Manchester encoding rules are as follows: when a long high level appears in the code stream, it means that the transmission is data 0; when a long low level appears in the code stream, it means that the transmission is data 1; when a long high level in the code stream is followed by a falling edge, it means that data 1 is transmitted; when a long low level in the code stream is followed by a rising edge, it means that data 0 is transmitted.
[0046] A Manchester decoding method, using the Manchester decoding system as above, comprises the following steps:
[0047] (1) The processor chip system provides the system clock and sends it to the synchronization unit, low-level counting unit, and high-level counting unit;
[0048] (2) The synchronization unit uses the system clock to synchronize the input Manchester code stream and sends the synchronized Manchester code stream to the low-level counting unit and the high-level counting unit;
[0049] (3) The low-level counting unit uses the beat of the system clock to count the low-level signals in the synchronized Manchester code stream, that is, to count the duration of each low level and send it to the counting storage unit, the counting comparison unit and the low-level comparison unit;
[0050] The high-level counting unit uses the beat of the system clock to count the high-level signals in the synchronized Manchester code stream, that is, to count the duration of each high level and send it to the high-level comparison unit;
[0051] (4) The counting comparison unit compares the magnitude of the two low-level count values before and after. If 3 / 4 of the larger count value is still greater than the smaller count value, the comparison is successful. Otherwise, the comparison continues. The new maximum value is continuously compared with the previously counted maximum value through the feedback system to generate a more accurate maximum value and send it to the maximum value storage unit.
[0052] (5) The low level comparison unit compares the low level count value sent by the low level counting unit with the maximum value sent by the maximum value storage unit. If the low level count value is greater than 3 / 4 of the maximum value, it means that a long low level is detected;
[0053] The high level comparison unit compares the high level count value sent by the high level counting unit with the maximum value sent by the maximum value storage unit. If the high level count value is greater than 3 / 4 of the maximum value, it means that a long high level is detected.
[0054] (6) The data parsing unit decodes the valid communication data according to the long low level, long high level and falling edge and rising edge in the Manchester code stream detected by the previous unit and the Manchester coding rules.
[0055] Example:
[0056] Set the application scenario: Manchester code stream such as Figure 3 As shown, the data sent is XX100111000X, and the specific decoding results are as follows:
[0057] 1. The counting comparison unit will continuously compare the count value of the detected low level. Two different values are detected in the time period t1 and t2. The maximum count value is found by comparison and the long low level flag is set. Since the long low level appears, data 1 can be parsed.
[0058] 2. There is only a falling edge in the t3 time period. Since the previous one is a long low level, data 0 can be parsed.
[0059] 3. In the t4 period, by comparing the high level count and the maximum count value, a long high level can be found, and the long high level flag is set. Since the long high level appears, data 0 can be parsed.
[0060] 4. There are rising edges and falling edges in the t5 time period. Since a long high level was detected previously, the rising edge is valid and data 11 can be parsed.
[0061] 5. In the t6 period, by comparing the low level count and the maximum count value, a long low level can be found, and the long low level flag is set. Since the long low level appears, data 1 can be parsed.
[0062] 6. There are rising edges and falling edges in the t7 time period. Since a long low level was detected previously, the two falling edges are valid and the data 00 can be parsed.
[0063] 7. In the t8 time period, by comparing the high level count and the maximum count value, a long high level can be found, and the long high level flag is set. Since the long high level appears, data 0 can be parsed.
[0064] In summary, the system can parse the data 100111000 from the received Manchester code stream, which is consistent with the data in the transmitted data XX100111000X.
[0065] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A Manchester decoding system, characterized in that: It includes a system clock, a synchronization unit, a low-level counting unit, a high-level counting unit, a counting storage unit, a counting comparison unit, a maximum value storage unit, a low-level comparison unit, a high-level comparison unit and a data analysis unit; The system clock is provided by the processor chip system and is used for counting. The synchronization unit: uses the system clock to synchronize the input Manchester code stream, and sends the synchronized Manchester code stream to the low-level counting unit and the high-level counting unit; The low-level counting unit counts the low-level signals in the synchronized Manchester code stream using the beat of the system clock, that is, counts the duration of each low level and sends it to the counting storage unit, the counting comparison unit and the low-level comparison unit; The high level counting unit counts the high level signals in the synchronized Manchester code stream using the beat of the system clock, that is, counts the duration of each high level and sends it to the high level comparison unit; The counting storage unit stores the count of the previous low level for use by the following counting comparison unit; The counting comparison unit compares the magnitudes of the two low-level count values before and after. If 3 / 4 of the larger count value is still greater than the smaller count value, the comparison is successful. Otherwise, the comparison continues. The counting comparison unit has a feedback system, which continuously compares the new maximum value with the previously counted maximum value to generate a more accurate maximum value. The maximum value storage unit is used to store the maximum count value of the successful comparison for use by the subsequent low level comparison unit and high level comparison unit; The low level comparison unit compares the low level count value sent by the low level counting unit with the maximum value sent by the maximum value storage unit. If the low level count value is greater than 3 / 4 of the maximum value, it indicates that a long low level is detected. The high level comparison unit compares the high level count value sent by the high level counting unit with the maximum value sent by the maximum value storage unit. If the high level count value is greater than 3 / 4 of the maximum value, it indicates that a long high level is detected. The data analysis unit decodes valid communication data according to the long low level, long high level and falling edge and rising edge in the Manchester code stream detected by the previous unit and in combination with the Manchester coding rule.
2. A Manchester decoding system according to claim 1, characterized in that: The Manchester encoding rule is as follows: when a long high level appears in the code stream, it means that the transmission is data 0; when a long low level appears in the code stream, it means that the transmission is data 1; when a long high level in the code stream is followed by a falling edge, it means that data 1 is transmitted; when a long low level in the code stream is followed by a rising edge, it means that data 0 is transmitted.
3. A Manchester decoding method, using a Manchester decoding system as claimed in claim 1 or 2, characterized in that: The steps include: (1) The processor chip system provides the system clock and sends it to the synchronization unit, low-level counting unit, and high-level counting unit; (2) The synchronization unit uses the system clock to synchronize the input Manchester code stream and sends the synchronized Manchester code stream to the low-level counting unit and the high-level counting unit; (3) The low-level counting unit uses the beat of the system clock to count the low-level signals in the synchronized Manchester code stream, that is, to count the duration of each low level and send it to the counting storage unit, the counting comparison unit and the low-level comparison unit; The high-level counting unit uses the beat of the system clock to count the high-level signals in the synchronized Manchester code stream, that is, to count the duration of each high level and send it to the high-level comparison unit; (4) The counting comparison unit compares the magnitude of the two low-level count values before and after. If 3 / 4 of the larger count value is still greater than the smaller count value, the comparison is successful. Otherwise, the comparison continues. The new maximum value is continuously compared with the previously counted maximum value through the feedback system to generate a more accurate maximum value and send it to the maximum value storage unit. (5) The low level comparison unit compares the low level count value sent by the low level counting unit with the maximum value sent by the maximum value storage unit. If the low level count value is greater than 3 / 4 of the maximum value, it means that a long low level is detected; The high level comparison unit compares the high level count value sent by the high level counting unit with the maximum value sent by the maximum value storage unit. If the high level count value is greater than 3 / 4 of the maximum value, it means that a long high level is detected. (6) The data parsing unit decodes the valid communication data according to the long low level, long high level and falling edge and rising edge in the Manchester code stream detected by the previous unit and the Manchester coding rules.
Citation Information
Patent Citations
Bit synchronization decoding method
CN101604161A
Manchester code receiving circuit
CN103888143A