MCU-based AUX channel communication method

By configuring the MCU's hardware SPI function and differential signal conversion chip, combined with a timeout detection mechanism, the complexity and high cost of the FPGA solution are solved, and efficient and low-cost AUX communication is achieved to adapt to various application scenarios.

CN120687400APending Publication Date: 2025-09-23SHENZHEN SKYCODE TESTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510777966.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

The existing FPGA-based AUX channel communication method has complex hardware design, high development cost, and high development threshold, making it difficult for small enterprises or start-ups to accept it.

Method used

The MCU's hardware SPI function configuration is used, combined with a differential signal conversion chip and a timeout detection mechanism to simplify hardware design, reduce development complexity and cost, and ensure the stability and reliability of data transmission through encoding and data correction.

Benefits of technology

It has achieved efficient and low-cost AUX communication, lowered the technical threshold, improved communication quality and robustness, adapted to different application scenarios, and promoted the popularization of AUX communication technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687400A_ABST
    Figure CN120687400A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of embedded communication, and discloses an MCU-based AUX channel communication method. According to the method, by configuring the hardware SPI function of the MCU, the hardware design is simplified, the complexity and cost of development are reduced, by means of the MCU, a developer can more easily achieve data transmission without deeply knowing complex hardware description languages, the technical threshold is reduced, and then the development speed is improved by adopting the mode of encoding and differential signal conversion chips. Stability and reliability of data in the transmission process are ensured, communication quality is improved, communication robustness is improved due to introduction of an overtime detection mechanism, the problem of data loss can be effectively solved, efficient operation of a system is ensured, AUX data can be accurately extracted by correcting and analyzing received original SPI data, and the accuracy of the system is improved. The integrity and accuracy of the information are ensured, and the application of the method provides a new way for realizing a high-efficiency and low-cost display control solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of embedded communication technology, and in particular to an AUX channel communication method based on MCU. Background Art

[0002] In modern electronic devices, AUX channel communication, as an important data transmission method, is widely used in multimedia devices such as audio and video. Existing AUX channel communication methods mainly rely on FPGA (field programmable gate array) technology. Due to its high flexibility and programmability, FPGA can implement complex communication protocols and data processing functions. However, FPGA-based AUX communication solutions have also exposed some problems in practical applications, mainly manifested in complex hardware design and high development costs.

[0003] FPGA hardware design usually requires professional knowledge and skills. Developers need to be familiar with hardware description languages ​​and FPGA architecture, which undoubtedly increases the development threshold. In addition, the FPGA design and verification process is relatively cumbersome and requires a lot of time for testing and debugging, which in turn prolongs the product's time to market.

[0004] From a cost perspective, FPGA chips are relatively expensive, and in order to implement AUX communication functions, additional external circuits and components are often required, which significantly increases the overall hardware cost. This may become an unbearable burden for some small businesses or start-ups. Summary of the Invention

[0005] (1) Technical problems solved

[0006] In response to the shortcomings of the existing technology, the present invention provides an AUX channel communication method based on MCU. By configuring the hardware SPI function of the MCU, the hardware design is simplified. Compared with the traditional FPGA-based solution, the development complexity and cost are reduced. The use of MCU enables developers to more easily realize data transmission without in-depth understanding of complex hardware description language, which lowers the technical threshold. Secondly, the use of encoding and differential signal conversion chips ensures the stability and reliability of data during transmission and improves the communication quality. In addition, the introduction of the timeout detection mechanism improves the robustness of communication, can effectively deal with the problem of data loss, and ensure the efficient operation of the system. By correcting and parsing the received original SPI data, the AUX data can be accurately extracted, ensuring the integrity and accuracy of the information. This method not only improves the efficiency of data communication, but also can flexibly adapt to different application scenarios, further promoting the popularization and development of AUX communication technology, and providing a new way to achieve high-efficiency and low-cost display control solutions.

[0007] (2) Technical solution

[0008] To achieve the above object, the present invention provides the following technical solution: an MCU-based AUX channel communication method, comprising the following steps:

[0009] S1. Configure the hardware SPI function of the MCU;

[0010] S2. Encode the data to be sent, send it through the MCU's hardware SPI, and convert it into a standard differential AUX interface signal through a differential signal conversion chip;

[0011] If no response is received within 400us, it is considered a timeout and the process returns to step S2. If a response is received, the original SPI data is corrected.

[0012] S4. Parse the corrected original SPI data according to the format, extract the AUX data in the reply signal, and return the result.

[0013] Preferably, in S1, the hardware SPI function of the MCU is configured, the SPI is set to slave mode, bidirectional full-duplex, and data transmission is specified to start from the MSB bit.

[0014] Preferably, in S1, the clock module of the MCU is used to generate a PWM with an even frequency greater than or equal to 6 MHz, which is connected to the clock pin of the SPI.

[0015] Preferably, in S2, the signals of even frequencies are encoded as data to be transmitted in the following format, sent using the hardware SPI of the MCU, and converted into standard differential AUX interface signals through a differential signal conversion chip:

[0016] If the clock of the SPI is 6MHz, the binary value "000111" represents the binary value "0" of the AUX communication, and the binary value "111000" represents the binary value "1" of the AUX communication.

[0017] If the clock connected to the SPI is 8MHz, the binary "00001111" represents the binary "0" of the AUX communication, and the binary "11110000" represents the binary "1" of the AUX communication.

[0018] Preferably, in S4, the corrected data is restored to an AUX signal according to the rule described in S2, the data in the AUX signal is extracted, and the result is returned.

[0019] Compared with the prior art, the present invention provides an MCU-based AUX channel communication method, which has the following beneficial effects:

[0020] The present invention simplifies the hardware design by configuring the hardware SPI function of the MCU, and reduces the complexity and cost of development compared to traditional FPGA-based solutions. The use of the MCU enables developers to more easily implement data transmission without in-depth understanding of complex hardware description languages, thus lowering the technical threshold. Secondly, the use of encoding and differential signal conversion chips ensures the stability and reliability of data during transmission, thereby improving the communication quality. In addition, the introduction of the timeout detection mechanism improves the robustness of communication, can effectively deal with data loss problems, and ensure the efficient operation of the system. By correcting and parsing the received raw SPI data, the AUX data can be accurately extracted, ensuring the integrity and accuracy of the information. This method not only improves the efficiency of data communication, but also can flexibly adapt to different application scenarios, further promoting the popularization and development of AUX communication technology, and providing a new way to achieve high-efficiency, low-cost display control solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Schematic diagram of the steps of the method of the present invention;

[0022] Figure 2 The figure is a workflow diagram corresponding to the steps of the method of the present invention. DETAILED DESCRIPTION

[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0024] In view of the fact that the current implementation of AUX channel communication requires dedicated chips or high-speed signal devices such as FPGA, which increases the cost and development difficulty of the system, an MCU-based AUX channel communication method is proposed. Figure 1 , the method comprises the following steps:

[0025] S1. Configure the hardware SPI function of the MCU;

[0026] Configuring the MCU's hardware SPI function is a key step in achieving efficient AUX channel communication. In this process, you first need to set the SPI to slave mode. In slave mode, the clock signal is input externally to ensure uninterrupted data transmission and reception. Selecting bidirectional full-duplex mode allows data to be transmitted in both directions simultaneously, which is crucial for improving communication efficiency. On this basis, specifying that data transmission starts from the MSB (most significant bit) helps ensure the correctness of data parsing, because in many communication protocols, the bit order of the data may affect the interpretation of the information;

[0027] Secondly, use the MCU's clock module to generate a 6MHz (or 8MHz, 10MHz, or other even-numbered frequency greater than 6MHz) PWM signal and connect it to the SPI clock pin to provide a stable clock source for data transmission. The selection of frequency must take into account the requirements of AUX communication and signal integrity to ensure that data errors can be reduced during high-speed transmission. Through precise clock control, the MCU can synchronize with external devices to ensure timely data transmission.

[0028] This series of configurations not only enhances the performance of the MCU as a slave, but also lays a solid foundation for subsequent data encoding and parsing, thereby achieving high-quality and reliable AUX channel communication. The application of this technical means enables the MCU to demonstrate strong adaptability and stability in complex data communication environments, providing flexible solutions for various application scenarios.

[0029] S2. Encode the data to be sent, send it through the MCU's hardware SPI, and convert it into a standard differential AUX interface signal through a differential signal conversion chip;

[0030] In the process of implementing AUX channel communication, encoding the data to be sent is a key step to ensure accurate information transmission. First, the data is encoded through the MCU's hardware SPI interface. This process involves converting the digital signal into a specific binary format to enable effective transmission at different clock frequencies. For example, when the SPI clock frequency is set to 6MHz, the binary number "000111" is defined as binary "0" for AUX communication, while "111000" represents binary "1". This encoding method takes advantage of the change in clock frequency to ensure the stability and accuracy of data during transmission.

[0031] Furthermore, when the SPI clock frequency is increased to 8MHz, the encoding rules are adjusted accordingly. Binary "00001111" represents binary "0" for AUX communication, while "11110000" represents binary "1". The same logic applies to higher clock frequencies, such as 10MHz or 12MHz, and the binary encoding will also change accordingly. This flexible encoding strategy not only improves data transmission efficiency but also allows the system to maintain compatibility under different operating conditions.

[0032] After the data is sent through the MCU's hardware SPI, it will be converted into a standard differential AUX interface signal through a differential signal conversion chip. The differential signal conversion has good anti-interference ability and can effectively reduce the impact of noise on signal quality, thereby ensuring that the signal transmission maintains high reliability in complex electromagnetic environments. Through this technical means, the MCU can not only efficiently perform data encoding and transmission, but also achieve seamless docking with the standard AUX interface through differential signal conversion;

[0033] If no response is received within 400us, it is considered a timeout and the process returns to step S2. If a response is received, the original SPI data is corrected.

[0034] When receiving data, it is extremely important to set a 400us timeout mechanism. If no response is received within this time window, the system will determine that it has timed out and return to step 2 to resend the data to ensure the integrity and reliability of the information. This design not only enhances the stability of communication, but also improves the fault tolerance of the system.

[0035] When the MCU receives the reply within the specified time, the next step is to correct the received original SPI data to deal with the slight deviations that may occur during the data transmission process. Taking the SPI clock frequency of 6MHz as an example, the continuity and consistency of the encoding are particularly critical in data analysis. Specifically, when 2, 3, or 4 consecutive "0"s and "1"s are received, these signals can be regarded as a unit of low level (0) and high level (1). For example, the received data sequences "00111", "0000111", "00011" and "00001111" can all be effectively corrected to the standard "000111", and the same is true for the binary "111000";

[0036] Furthermore, if 5, 6, or 7 consecutive "0"s and "1"s are received, they can be regarded as two units of low level (0) and high level (1). For example, the binary "01" of the AUX signal may appear as "000111111000" in the SPI data. During actual reception, due to noise clock jitter, the received data may be distorted, such as "0011111100", "00011111000" or "0001111111000". Through this flexible correction mechanism, the MCU can automatically identify and correct these deviations during the data parsing process, thereby ensuring that the final extracted AUX data is accurate. This technical means not only improves the reliability of data transmission, but also enhances the system's adaptability in complex environments, providing a solid technical foundation for efficient AUX communication.

[0037] S4. Parse the corrected original SPI data according to the format, extract the AUX data in the reply signal, and return the result;

[0038] In step 4, format parsing of the corrected raw SPI data is a key step in ensuring the correct extraction of the AUX signal data. In this process, the corrected data must first be restored to a standard AUX signal according to the encoding rules in step 2. This restoration process involves bit-by-bit analysis of the data to identify the meaning of each code and convert it into the corresponding AUX signal.

[0039] Specifically, first, the system will group the received correction data and identify the continuous encoding of low level (0) and high level (1). For example, under the 6MHz SPI clock, the system will regard multiple consecutive "0" or "1" as a signal unit, and then restore it to the corresponding AUX signal bit. In this process, the system needs to carefully analyze the structure of the data stream to ensure that each signal unit is accurately identified and restored, so as to avoid data parsing errors caused by timing errors or noise interference;

[0040] Once the data is successfully restored, the system extracts the valid data from the AUX signal. This extraction process involves identifying the specific data format. For example, the AUX signal may include structural information such as start bits, data bits, and stop bits. By parsing this structure, the system can accurately obtain the required valid data and return it to the upper-layer application or processing module.

[0041] The implementation of this technical means not only ensures the accuracy and integrity of the data, but also improves the system's adaptability to complex signal environments, so that the effect of AUX communication remains stable under changing working conditions. Ultimately, through this series of precise parsing and extraction steps, the system can effectively transmit the required information to subsequent processing links, laying a solid foundation for achieving efficient multimedia data interaction.

[0042] Through the comprehensive application of the above methods, not only the efficiency of data communication is improved, but also it can be flexibly adapted to different application scenarios, providing a new way to achieve high-efficiency and low-cost display control solutions.

[0043] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An AUX channel communication method based on MCU, characterized in that: The following steps are involved: S1. Configure the hardware SPI function of the MCU; S2. Encode the data to be sent, send it through the MCU's hardware SPI, and convert it into a standard differential AUX interface signal through a differential signal conversion chip; If no response is received within 400us, it is considered a timeout and the process returns to step S2. If a response is received, the original SPI data is corrected. S4. Parse the corrected original SPI data according to the format, extract the AUX data in the reply signal, and return the result.

2. The MCU-based AUX channel communication method according to claim 1, wherein: In the above S1, the hardware SPI function of the MCU is configured, the SPI is set to slave mode, bidirectional full-duplex, and data transmission is specified to start from the MSB bit.

3. The MCU-based AUX channel communication method according to claim 2, wherein: In the S1, the clock module of the MCU is used to generate a PWM with an even frequency greater than or equal to 6 MHz, which is connected to the clock pin of the SPI.

4. The MCU-based AUX channel communication method according to claim 3, wherein: In S2, even-frequency signals are encoded in the following format to be transmitted, sent using the MCU's hardware SPI, and converted into standard differential AUX interface signals by the differential signal conversion chip: If the clock of the SPI is 6MHz, the binary value "000111" represents the binary value "0" of the AUX communication, and the binary value "111000" represents the binary value "1" of the AUX communication. If the clock connected to the SPI is 8MHz, the binary "00001111" represents the binary "0" of the AUX communication, and the binary "11110000" represents the binary "1" of the AUX communication.

5. The MCU-based AUX channel communication method according to claim 4, characterized in that: In S4, the corrected data is restored to an AUX signal according to the rule described in S2, the data in the AUX signal is extracted, and the result is returned.