Circuit and method for realizing execution of different functions by same program based on AD detection
By using multiple MCU chips and different voltage dividers on the same PCB board, combined with AD detection technology, multiple functions are implemented under the same program, solving the problems of high R&D costs and complex production caused by diversification of functions in traditional methods.
Patent Information
- Application Number
- CN202411902328.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-25
AI Technical Summary
In traditional methods, in order to achieve different functions, independent PCB boards need to be designed for each specific function, resulting in high R&D costs, long time, and complex inventory management and production materials preparation.
Using a circuit design based on AD detection, by using multiple MCU chips on the same PCB board, each chip is connected to a different voltage divider circuit, and the port voltage is automatically detected using AD conversion technology to execute the corresponding program logic.
It realizes the execution of multiple functions under the same program, reduces the workload of software maintenance, simplifies the production and material preparation process, improves production efficiency, reduces the risk of version control errors, and enhances the reliability and maintainability of the system.
Smart Images

Figure CN119884005A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip application technology, and in particular to a circuit and method for implementing different functions of the same program based on AD detection. Background Art
[0002] The design idea of realizing different functional application fields on the same PCB board is a manifestation of the pursuit of flexibility and integration in modern electronic engineering. Traditional methods often require the design of independent PCB boards for each specific function, which not only increases R&D costs and time, but also complicates inventory management and production preparation.
[0003] However, with the advancement of technology, the industry has begun to explore the possibility of integrating multiple functions on the same PCB board. For example, using mixed analog and digital technology, or even radio frequency technology, on the same substrate to achieve the purpose of miniaturization of design and improve product functions. Such a design can not only reduce physical space occupation, but also reduce manufacturing costs and simplify supply chain management. For MCU development, this means that diverse application requirements can be supported on the same hardware platform without the need to customize specialized hardware for each specific application scenario. In this way, engineers can respond to market changes and technological updates more flexibly. Summary of the invention
[0004] The purpose of the present invention is to provide a circuit and method for implementing different functions in the same program based on AD detection, so as to solve the problems existing in the above-mentioned prior art.
[0005] To achieve the above object, the technical solution adopted by the present invention is:
[0006] In a first aspect, the present invention provides a circuit for implementing different functions of the same program based on AD detection, comprising at least a first MCU chip and a second MCU chip, wherein the first pin and the seventh pin of the first MCU chip are both connected to VCC, and the eighth pin of the first MCU chip is connected to GND; the first pin of the second MCU chip is connected to VCC, the eighth pin of the second MCU chip is connected to GND, and the seventh pin of the second MCU chip is connected to a voltage divider circuit composed of a first resistor and a second resistor;
[0007] The seventh pin of the second MCU chip is connected to a voltage divider circuit consisting of a first resistor and a second resistor, comprising:
[0008] The first ends of the first resistor and the second resistor are commonly connected to the seventh pin of the second MCU chip, the second end of the first resistor is connected to VCC, the second end of the second resistor is connected to GND, the resistance of the first resistor is 100K, and the resistance of the second resistor is 300K.
[0009] In a possible implementation, a third MCU chip is further included, wherein a first pin of the third MCU chip is connected to VCC, an eighth pin of the third MCU chip is connected to GND, and a seventh pin of the third MCU chip is connected to a voltage divider circuit composed of a third resistor and a fourth resistor;
[0010] The seventh pin of the third MCU chip is connected to a voltage divider circuit consisting of a third resistor and a fourth resistor, including:
[0011] The first ends of the third resistor and the fourth resistor are commonly connected to the seventh pin of the third MCU chip, the second end of the third resistor is connected to GND, the second end of the fourth resistor is connected to VCC, the resistance of the third resistor is 200K, and the resistance of the fourth resistor is 200K.
[0012] In a possible implementation, a fourth MCU chip is further included, wherein a first pin of the fourth MCU chip is connected to VCC, an eighth pin of the fourth MCU chip is connected to GND, and a seventh pin of the fourth MCU chip is connected to a voltage divider circuit composed of a fifth resistor and a sixth resistor;
[0013] The seventh pin of the fourth MCU chip is connected to a voltage divider circuit consisting of a fifth resistor and a sixth resistor, comprising:
[0014] The first ends of the fifth resistor and the sixth resistor are commonly connected to the seventh pin of the fourth MCU chip, the second end of the fifth resistor is connected to VCC, the second end of the sixth resistor is connected to GND, the resistance of the fifth resistor is 300K, and the resistance of the sixth resistor is 100K.
[0015] In a possible implementation, a fifth MCU chip is further included, wherein a first pin of the fifth MCU chip is connected to VCC, and a seventh pin and an eighth pin of the fifth MCU chip are both connected to GND.
[0016] In a second aspect, the present application provides a method for implementing different functions of the same program based on AD detection, the method being applied to the circuit for implementing different functions of the same program based on AD detection as described above, the method comprising:
[0017] In response to the first MCU chip and the second MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltages of the seventh pins of the first MCU chip and the second MCU chip;
[0018] Based on the voltage of the seventh pin of the first MCU chip being VCC, the collected AD value is (12-bit AD value 4096)×(voltage VCC of the seventh pin of the first MCU chip) / (reference voltage VCC)=4096, corresponding to the execution of the first function program;
[0019] Based on the fact that the voltage of the seventh pin of the second MCU chip is VCC×300K / (100K+300K)=VCC×3 / 4, the collected AD value is (12-bit AD value 4096)×(the voltage of the seventh pin of the second MCU chip VCC×3 / 4) / (reference voltage VCC)=3072, which corresponds to the execution of the second function program.
[0020] In a possible implementation, the method further includes:
[0021] In response to the third MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltage of the seventh pin of the third MCU chip;
[0022] Based on the fact that the voltage of the seventh pin of the third MCU chip is VCC×200K / (200K+200K)=VCC×2 / 4, the collected AD value is (12-bit ad value 4096)×(the voltage of the seventh pin of the third MCU chip VCC×2 / 4) / (reference voltage VCC)=2048, which corresponds to the execution of the third function program.
[0023] In a possible implementation, the method further includes:
[0024] In response to the fourth MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltage of the seventh pin of the fourth MCU chip;
[0025] Based on the fact that the voltage of the seventh pin of the fourth MCU chip is VCC×100K / (300K+100K)=VCC×1 / 4, the collected AD value is (12-bit AD value 4096)×(the seventh pin VCC×1 / 4 of the fourth MCU chip) / (reference voltage VCC)=1024, corresponding to the execution of the fourth function program.
[0026] In a possible implementation, the method further includes:
[0027] In response to the fifth MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltage of the seventh pin of the fifth MCU chip;
[0028] Based on the voltage of the seventh pin of the fifth MCU chip being 0V, the collected AD value is (12-bit AD value 4096)×(the voltage of the seventh pin of the fifth MCU chip being 0V) / (reference voltage VCC)=0, corresponding to the execution of the fifth function program.
[0029] The beneficial effects brought about by the technical solution provided by the present invention include at least:
[0030] By adopting AD detection technology, the port voltage is automatically detected when the system is powered on, and the corresponding program logic is executed accordingly, so that a single program can support multiple functions. This method cleverly solves the problem of needing to write multiple versions of programs for different functions in the traditional development model, greatly reducing the workload of software maintenance. More importantly, it greatly simplifies the production and material preparation process, because in actual production, only one universal PCB board needs to be prepared, and only one program needs to be burned to meet various functional requirements. This strategy not only improves production efficiency, but also reduces the risk of errors caused by improper version control. In addition, due to the reduction in the amount of dedicated hardware, the reliability and maintainability of the overall system are also enhanced. In short, this invention provides an economical and efficient solution suitable for product development environments that need to respond quickly to changes in market demand. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0032] Figure 1 A schematic diagram of the structure of a circuit for implementing different functions with the same program based on AD detection provided by an exemplary embodiment of the present invention is shown.
[0033] Figure 2 A flow chart of a method for implementing different functions in the same program based on AD detection provided by an exemplary embodiment of the present invention is shown. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0035] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0036] Figure 1A schematic diagram of a circuit for implementing different functions of the same program based on AD detection provided by an exemplary embodiment of the present invention is shown, wherein the circuit for implementing different functions of the same program based on AD detection comprises at least a first MCU chip and a second MCU chip, wherein the first pin and the seventh pin of the first MCU chip are both connected to VCC, and the eighth pin of the first MCU chip is connected to GND; the first pin of the second MCU chip is connected to VCC, the eighth pin of the second MCU chip is connected to GND, and the seventh pin of the second MCU chip is connected to a voltage divider circuit composed of a first resistor and a second resistor;
[0037] The seventh pin of the second MCU chip is connected to a voltage divider circuit consisting of a first resistor and a second resistor, including:
[0038] The first ends of the first resistor and the second resistor are commonly connected to the seventh pin of the second MCU chip, the second end of the first resistor is connected to VCC, the second end of the second resistor is connected to GND, the resistance of the first resistor is 100K, and the resistance of the second resistor is 300K.
[0039] In the embodiment of the present application, the key role of this voltage divider circuit is that it can provide a specific voltage level for the seventh pin of the second MCU chip, which is the result of proportionally dividing the VCC voltage by two series resistors. In this example, since the first resistor is 100KΩ and the second resistor is 300KΩ, the voltage at the seventh pin will be about one-quarter of the VCC voltage. When the system is powered on, the second MCU chip can read the voltage value on the seventh pin through the built-in ADC, and decide which preset function mode to start based on this voltage value.
[0040] Furthermore, the circuit for implementing different functions of the same program based on AD detection also includes a third MCU chip, a first pin of the third MCU chip is connected to VCC, an eighth pin of the third MCU chip is connected to GND, and a seventh pin of the third MCU chip is connected to a voltage divider circuit composed of a third resistor and a fourth resistor;
[0041] The seventh pin of the third MCU chip is connected to a voltage divider circuit composed of a third resistor and a fourth resistor, including:
[0042] The first ends of the third resistor and the fourth resistor are commonly connected to the seventh pin of the third MCU chip, the second end of the third resistor is connected to GND, the second end of the fourth resistor is connected to VCC, the resistance of the third resistor is 200K, and the resistance of the fourth resistor is 200K.
[0043] In the embodiment of the present application, this specific resistor configuration enables the seventh pin of the third MCU chip to obtain a fixed voltage level, that is, half of the VCC voltage (because the third resistor and the fourth resistor have equal resistance values, forming a 1:1 proportional voltage divider). When the system is powered on, the third MCU chip can read this fixed voltage value on the seventh pin through the built-in ADC, and decide which preset functional mode to start or perform a specific task based on this voltage value. Since the voltage provided by the voltage divider circuit of the third MCU chip is different from the setting of the second MCU chip (the latter is one-quarter of VCC), this allows different MCUs to independently select and run different functional logics based on their own unique voltage values detected under the same set of program codes.
[0044] Furthermore, the circuit for implementing different functions of the same program based on AD detection also includes a fourth MCU chip, a first pin of the fourth MCU chip is connected to VCC, an eighth pin of the fourth MCU chip is connected to GND, and a seventh pin of the fourth MCU chip is connected to a voltage divider circuit composed of a fifth resistor and a sixth resistor;
[0045] The seventh pin of the fourth MCU chip is connected to a voltage divider circuit consisting of a fifth resistor and a sixth resistor, including:
[0046] The first ends of the fifth resistor and the sixth resistor are commonly connected to the seventh pin of the fourth MCU chip, the second end of the fifth resistor is connected to VCC, the second end of the sixth resistor is connected to GND, the resistance of the fifth resistor is 300K, and the resistance of the sixth resistor is 100K.
[0047] In the embodiment of the present application, this specific resistor configuration enables the seventh pin of the fourth MCU chip to obtain a fixed voltage level, which is approximately three quarters of the VCC voltage (due to the ratio of the fifth resistor to the sixth resistor being 3:1). When the system is powered on, the fourth MCU chip can read this fixed voltage value on the seventh pin through the built-in ADC, and decide which preset functional mode to start or perform a specific task based on this voltage value. Since the voltage provided by the voltage divider circuit of the fourth MCU chip is different from that of the second MCU chip (one quarter of VCC) and the third MCU chip (half of VCC), this allows different MCUs under the same set of program codes to independently select and run different functional logics based on their respective unique voltage values detected, thereby achieving multi-mode support.
[0048] More specifically, the circuit for implementing different functions of the same program based on AD detection also includes a fifth MCU chip, a first pin of the fifth MCU chip is connected to VCC, and a seventh pin and an eighth pin of the fifth MCU chip are both connected to GND.
[0049] In an embodiment of the present application, when the seventh pin of the fifth MCU chip is set as one of the ADC channels and an absolute zero voltage reference is required, connecting it directly to GND can provide a very clean and stable reference point.
[0050] Figure 2 A flow chart of a method for implementing different functions of the same program based on AD detection provided by an exemplary embodiment of the present invention is shown. The method for implementing different functions of the same program based on AD detection is applied to the above-mentioned circuit for implementing different functions of the same program based on AD detection. The method includes:
[0051] Step 201, in response to the first MCU chip and the second MCU chip being powered on, using VCC as a reference voltage, and performing AD conversion on the voltages of the seventh pins of the first MCU chip and the second MCU chip;
[0052] Step 202, based on the voltage of the seventh pin of the first MCU chip being VCC, the collected AD value is (12-bit AD value 4096)×(voltage VCC of the seventh pin of the first MCU chip) / (reference voltage VCC)=4096, correspondingly executing the first function program;
[0053] Step 203, based on the voltage of the seventh pin of the second MCU chip being VCC×300K / (100K+300K)=VCC×3 / 4, the collected AD value is (12-bit AD value 4096)×(voltage of the seventh pin of the second MCU chip VCC×3 / 4) / (reference voltage VCC)=3072, corresponding to the execution of the second function program.
[0054] In the embodiment of the present application, the above steps 201 to 203 describe a mechanism for determining the execution of different functional programs based on the AD conversion result, by cleverly using the seventh pin of the MCU chip to connect different voltage-dividing circuits, and using VCC as the reference voltage for AD conversion, thereby realizing the selective activation of different functions. Specifically, in step 201, when the first MCU chip and the second MCU chip are powered on, they will use VCC as the ADC reference voltage (i.e., the reference voltage) and perform AD conversion on the voltage on their respective seventh pins. The key here is that the seventh pins of the two MCUs are respectively connected to different circuits, causing them to output different voltage values to the ADC under the same VCC power supply conditions. For the first MCU chip, its seventh pin is directly connected to VCC, so the voltage of the pin is equal to VCC. Since the reference voltage of the ADC is also VCC, ideally, when using an ADC with a 12-bit resolution, the AD value collected will be a full-scale value of 4096 (i.e., 212212). This means that according to the formula ADvalue = (actual input voltage / reference voltage) × maximum digital value, if the voltage of the seventh pin is equal to the reference voltage VCC, the calculated AD value is 4096, and this AD value is used to trigger the execution of the first function program. In contrast, the seventh pin of the second MCU chip is connected to a voltage divider circuit composed of 300KΩ and 100KΩ, which makes the voltage of this pin only three-quarters of VCC. Similarly, when using a 12-bit ADC for conversion, the collected AD value will be 3072, and this AD value is used to trigger the execution of the second function program.
[0055] Furthermore, the method further comprises:
[0056] Step 204, in response to the third MCU chip being powered on, using VCC as a reference voltage, and performing AD conversion on the voltage of the seventh pin of the third MCU chip;
[0057] Step 205, based on the voltage of the seventh pin of the third MCU chip being VCC×200K / (200K+200K)=VCC×2 / 4, the collected AD value is (12-bit ad value 4096)×(voltage of the seventh pin of the third MCU chip VCC×2 / 4) / (reference voltage VCC)=2048, corresponding to the execution of the third function program.
[0058] In an embodiment of the present application, the seventh pin of the third MCU chip is connected to a voltage divider circuit consisting of 200KΩ and 200KΩ resistors, which makes the voltage on the pin half of VCC. When a 12-bit resolution ADC is used, the collected AD value is 2048, and this AD value is used to identify and trigger the execution of the third function program.
[0059] Furthermore, the method further comprises:
[0060] Step 206, in response to the fourth MCU chip being powered on, using VCC as a reference voltage to perform AD conversion on the voltage of the seventh pin of the fourth MCU chip;
[0061] Step 207, based on the voltage of the seventh pin of the fourth MCU chip being VCC×100K / (300K+100K)=VCC×1 / 4, the collected AD value is (12-bit AD value 4096)×(the seventh pin of the fourth MCU chip VCC×1 / 4) / (reference voltage VCC)=1024, corresponding to the execution of the fourth function program.
[0062] In an embodiment of the present application, a voltage divider circuit composed of 100KΩ and 300KΩ is connected between the seventh pin of the fourth MCU chip and the ground, which results in the voltage on the pin being only one-fourth of VCC. When a 12-bit resolution ADC is used, the collected AD value is 1024, and this AD value is used to identify and trigger the execution of the fourth function program.
[0063] More specifically, the method further comprises:
[0064] Step 208, in response to the fifth MCU chip being powered on, using VCC as a reference voltage, and performing AD conversion on the voltage of the seventh pin of the fifth MCU chip;
[0065] Step 209, based on the voltage of the seventh pin of the fifth MCU chip being 0V, the collected AD value is (12-bit AD value 4096)×(voltage of the seventh pin of the fifth MCU chip being 0V) / (reference voltage VCC)=0, correspondingly executing the fifth function program.
[0066] In the embodiment of the present application, if the seventh pin of the fifth MCU chip is directly grounded or connected to 0 V, the actual voltage on the pin is 0 V. When a 12-bit resolution ADC is used, the collected AD value is 0, and this AD value is used to identify and trigger the execution of the fifth function program.
[0067] In an optional embodiment, the collected AD value can execute the corresponding function program within a certain range, please refer to the following Table 1:
[0068] Table 1:
[0069] AD value Functional program executed by MCU 3896 to 4096 First function program 2972 to 3172 Second function program 1948 to 2148 Third function program 924 to 1124 Fourth Function Program 0 to 200 Fifth Function Program Other AD values Sixth Function Program
[0070] In summary, the same chip program can realize several different chip functions by judging the voltage of the seventh pin of the MCU chip when it is powered on. According to the above principle, the functions of the program can be continuously increased by simply adding judgment points for judging the AD value.
[0071] It should be understood that the specific examples herein are only intended to help those skilled in the art to better understand the present disclosure, rather than to limit the scope of the present invention.
[0072] It is understood that in the various implementations of this specification, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the present disclosure.
[0073] It can be understood that the various implementation modes described in this specification can be implemented individually or in combination, and the present disclosure is not limited to this.
[0074] Unless otherwise stated, all technical and scientific terms used in this disclosure have the same meaning as those generally understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in this disclosure and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0075] The above is only a specific implementation of this specification, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A circuit for implementing different functions in the same program based on AD detection, characterized in that: At least a first MCU chip and a second MCU chip are included, the first pin and the seventh pin of the first MCU chip are both connected to VCC, and the eighth pin of the first MCU chip is connected to GND; the first pin of the second MCU chip is connected to VCC, the eighth pin of the second MCU chip is connected to GND, and the seventh pin of the second MCU chip is connected to a voltage divider circuit composed of a first resistor and a second resistor; The seventh pin of the second MCU chip is connected to a voltage divider circuit consisting of a first resistor and a second resistor, comprising: The first ends of the first resistor and the second resistor are commonly connected to the seventh pin of the second MCU chip, the second end of the first resistor is connected to VCC, the second end of the second resistor is connected to GND, the resistance of the first resistor is 100K, and the resistance of the second resistor is 300K.
2. The circuit for realizing the execution of different functions by the same program based on AD detection according to claim 1, characterized in that: It also includes a third MCU chip, wherein a first pin of the third MCU chip is connected to VCC, an eighth pin of the third MCU chip is connected to GND, and a seventh pin of the third MCU chip is connected to a voltage divider circuit composed of a third resistor and a fourth resistor; The seventh pin of the third MCU chip is connected to a voltage divider circuit consisting of a third resistor and a fourth resistor, including: The first ends of the third resistor and the fourth resistor are commonly connected to the seventh pin of the third MCU chip, the second end of the third resistor is connected to GND, the second end of the fourth resistor is connected to VCC, the resistance of the third resistor is 200K, and the resistance of the fourth resistor is 200K.
3. The circuit for implementing different functions with the same program based on AD detection according to claim 2, characterized in that: It also includes a fourth MCU chip, wherein a first pin of the fourth MCU chip is connected to VCC, an eighth pin of the fourth MCU chip is connected to GND, and a seventh pin of the fourth MCU chip is connected to a voltage divider circuit composed of a fifth resistor and a sixth resistor; The seventh pin of the fourth MCU chip is connected to a voltage divider circuit consisting of a fifth resistor and a sixth resistor, comprising: The first ends of the fifth resistor and the sixth resistor are commonly connected to the seventh pin of the fourth MCU chip, the second end of the fifth resistor is connected to VCC, the second end of the sixth resistor is connected to GND, the resistance of the fifth resistor is 300K, and the resistance of the sixth resistor is 100K.
4. The circuit for implementing different functions with the same program based on AD detection according to claim 3, characterized in that: It also includes a fifth MCU chip, wherein the first pin of the fifth MCU chip is connected to VCC, and the seventh pin and the eighth pin of the fifth MCU chip are both connected to GND.
5. A method for implementing the same program to execute different functions based on AD detection, the method being applied to the circuit for implementing the same program to execute different functions based on AD detection as claimed in claim 4, characterized in that: The method comprises: In response to the first MCU chip and the second MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltages of the seventh pins of the first MCU chip and the second MCU chip; Based on the voltage of the seventh pin of the first MCU chip being VCC, the collected AD value is (12-bit AD value 4096)×(voltage VCC of the seventh pin of the first MCU chip) / (reference voltage VCC)=4096, corresponding to the execution of the first function program; Based on the voltage of the seventh pin of the second MCU chip being VCC×300K / (100K+300K)=VCC×3 / 4, the collected AD value is (12-bit AD value 4096)×(voltage of the seventh pin of the second MCU chip VCC×3 / 4) / (reference voltage VCC)=3072, corresponding to the execution of the second function program.
6. The method for implementing the same program to execute different functions based on AD detection according to claim 5, characterized in that: The method further comprises: In response to the third MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltage of the seventh pin of the third MCU chip; Based on the voltage of the seventh pin of the third MCU chip being VCC×200K / (200K+200K)=VCC×2 / 4, the collected AD value is (12-bit ad value 4096)×(voltage of the seventh pin of the third MCU chip VCC×2 / 4) / (reference voltage VCC)=2048, corresponding to the execution of the third function program.
7. The method for implementing the same program to execute different functions based on AD detection according to claim 6, characterized in that: The method further comprises: In response to the fourth MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltage of the seventh pin of the fourth MCU chip; Based on the voltage of the seventh pin of the fourth MCU chip being VCC×100K / (300K+100K)=VCC×1 / 4, the collected AD value is (12-bit AD value 4096)×(the seventh pin VCC×1 / 4 of the fourth MCU chip) / (reference voltage VCC)=1024, corresponding to the execution of the fourth function program.
8. The method for implementing the same program to execute different functions based on AD detection according to claim 7, characterized in that: The method further comprises: In response to the fifth MCU chip being powered on, using VCC as a reference voltage, performing AD conversion on the voltage of the seventh pin of the fifth MCU chip; Based on the voltage of the seventh pin of the fifth MCU chip being 0V, the collected AD value is (12-bit AD value 4096)×(the voltage of the seventh pin of the fifth MCU chip being 0V) / (reference voltage VCC)=0, corresponding to the execution of the fifth function program.