A double-button three-function control circuit and control method thereof

By designing a dual-button three-function control circuit and using a microcontroller to output three control signals, the problem of realizing three functional control under space constraints is solved, and low-cost, software-free functional control is achieved.

CN115079608BActive Publication Date: 2025-04-25GUANGDONG TELEPOWER TELECOM TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210715962.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2025-04-25
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

In the case of device layout or space limitations, how to control three functions through two buttons, and at low cost, avoiding the use of high-cost decoder ICs or microcontrollers.

Method used

A two-button three-function control circuit is designed, and the single-chip computer outputs three control signals through the combination of the first button, the second button and the third control circuit. The specific implementation method is: the first button and the second button trigger the microcontroller to output the first and second control signals through the first control circuit and the second control circuit respectively; and when the two buttons are turned on at the same time, the third control circuit is turned on, triggering the microcontroller to output the third control signal.

Benefits of technology

The control of triggering three functions through two buttons is realized, reducing hardware costs and avoiding software participation, and is suitable for design needs of limited product space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115079608B_ABST
    Figure CN115079608B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of circuit technology, and in particular to a dual-button three-function control circuit and a control method thereof, comprising: a power supply terminal, a first button, a second button, a first signal output terminal, a second signal output terminal, a third signal output terminal, a first control circuit, a second control circuit and a third control circuit; when the first button is connected to the power supply terminal, the first control circuit is turned on, and a single-chip microcomputer is triggered to output a first control signal through the first signal output terminal; when the second button is connected to the power supply terminal, the second control circuit is turned on, and the single-chip microcomputer is triggered to output a second control signal through the second signal output terminal; when the first button and the second button are connected to the power supply terminal at the same time, the first control circuit, the second control circuit and the third control circuit are turned on at the same time, and the single-chip microcomputer is triggered to output a third control signal through the first signal output terminal, the second signal output terminal and the third signal output terminal; the present invention can realize the control of three functions through two buttons under the premise of limited product space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic circuits, and in particular to a double-button three-function control circuit and a control method thereof. Background Art

[0002] When the device layout or space is limited and only two buttons can be arranged, but three functions need to be realized, the following two methods are generally used in the prior art:

[0003] 1. Use the decoder IC to realize the double button conversion of three signal quantities, and then make corresponding level conversion according to the required target level;

[0004] 2. Detect the button status through the single-chip microcomputer and output three signal quantities;

[0005] The hardware costs of both methods are slightly higher, and the second microcontroller method also requires software participation, which increases software development costs.

[0006] Therefore, it is necessary to provide a low-cost control button circuit that can control three functions through two buttons under the premise of limited product space. Summary of the invention

[0007] To solve the above problems, the present invention provides a dual-button three-function control circuit and a control method thereof to solve one or more technical problems existing in the prior art and at least provide a beneficial choice or create conditions.

[0008] In order to achieve the above object, the present invention provides the following technical solutions:

[0009] A double-button three-function control circuit, comprising:

[0010] A power supply terminal, a first button, a second button, a first signal output terminal, a second signal output terminal, a third signal output terminal, a first control circuit, a second control circuit and a third control circuit;

[0011] The input end of the first button and the input end of the second button are connected to the power supply end, the output end of the first button is connected to the first signal output end through the first control circuit, and the first control circuit is configured so that when the first button is connected to the power supply end, the first control circuit is turned on and triggers the single-chip microcomputer to output a first control signal through the first signal output end;

[0012] The output end of the second button is connected to the second signal output end through the second control circuit, and the second control circuit is configured so that when the second button is connected to the power supply end, the second control circuit is turned on and triggers the single-chip microcomputer to output a second control signal through the second signal output end;

[0013] The two input ends of the third control circuit are respectively connected to the output end of the first button and the output end of the second button, and the output end of the third control circuit is connected to the third signal output end. The third control circuit is configured so that when the first button and the second button are simultaneously connected to the power supply end, the first control circuit, the second control circuit and the third control circuit are simultaneously turned on, and the single-chip microcomputer is triggered to output the third control signal through the first signal output end, the second signal output end and the third signal output end.

[0014] Further, the first control circuit includes: a first pull-up resistor, a first pull-down resistor and a first transistor, one end of the first pull-up resistor is connected to the power supply end, and the other end is respectively connected to the collector of the first transistor and the first signal output end, one end of the first pull-down resistor is connected to the output end of the first button, and the other end is connected to the base of the first transistor, and the emitter of the first transistor is grounded.

[0015] Further, the first pull-up resistor includes a first resistor; and the first pull-down resistor includes a fourth resistor.

[0016] Furthermore, the first pull-down resistor further includes a fifth resistor, one end of the fifth resistor is connected to the output end of the first button, and the other end of the fifth resistor is grounded.

[0017] Furthermore, the second control circuit includes: a second pull-up resistor, a second pull-down resistor and a second transistor, one end of the second pull-up resistor is connected to the power supply end, and the other end is respectively connected to the collector of the second transistor and the second signal output end, one end of the second pull-down resistor is connected to the output end of the second button, and the other end is connected to the base of the second transistor, and the emitter of the second transistor is grounded.

[0018] Further, the third control circuit includes: a third pull-up resistor, a fourth pull-up resistor, a third pull-down resistor, a voltage-dividing resistor, a third triode, a fourth triode and a clamping diode; one end of the third pull-up resistor is connected to the power supply end, and the other end is respectively connected to the base of the third triode and one end of the voltage-dividing resistor, the emitter of the third triode is connected to the power supply end, and the collector of the third triode is connected to the third signal output end; the other end of the voltage-dividing resistor is connected to the collector of the fourth triode, the emitter of the fourth triode is grounded, the base of the fourth triode is respectively connected to one end of the fourth pull-up resistor and the anode of the clamping diode, the other end of the fourth pull-up resistor is connected to the output end of the first button, the cathode of the clamping diode is connected to one end of the third pull-down resistor, and the other end of the third pull-down resistor is grounded.

[0019] Furthermore, the collector of the third transistor is also connected to a grounding resistor, and the other end of the grounding resistor is grounded.

[0020] A two-button three-function control method is applied to any of the two-button three-function control circuits described above, characterized in that the method comprises the following steps:

[0021] Step S100, initializing the single chip microcomputer;

[0022] Step S200, the single-chip microcomputer detects the level of the first GPIO pin, the level of the second GPIO pin and the level of the third GPIO pin in real time; wherein the first GPIO pin is connected to the first signal output end, the second GPIO pin is connected to the second signal output end, and the third GPIO pin is connected to the third signal output end;

[0023] Step S300, when the first button is connected to the power supply end, execute step S400; when the second button is connected to the power supply end, execute step S500; when the first button and the second button are connected to the power supply end at the same time, execute step S600;

[0024] Step S400, in response to the action of the first button connecting to the power supply terminal, the single chip microcomputer detects the low level output by the first signal output terminal through the first GPIO pin, and triggers the first control signal;

[0025] Step S500, in response to the action of the second button connecting to the power supply terminal, the single chip microcomputer detects the low level output by the second signal output terminal through the second GPIO pin, and triggers the second control signal;

[0026] Step S600, in response to the action of the first button and the second button simultaneously connecting to the power supply terminal, the single-chip computer detects the high level output by the first signal output terminal through the first GPIO pin, detects the high level output by the second signal output terminal through the second GPIO pin, and detects the high level output by the third signal output terminal through the third GPIO pin, thereby triggering the third control signal.

[0027] The beneficial effects of the present invention are as follows: the present invention provides a dual-button three-function control circuit and a control method thereof, when the first button is connected to the power supply terminal, the first control circuit is turned on, and the single-chip microcomputer is triggered to output the first control signal through the first signal output terminal; when the second button is connected to the power supply terminal, the second control circuit is turned on, and the single-chip microcomputer is triggered to output the second control signal through the second signal output terminal; when the first button and the second button are connected to the power supply terminal at the same time, the first control circuit, the second control circuit and the third control circuit are turned on at the same time, and the single-chip microcomputer is triggered to output the third control signal through the first signal output terminal, the second signal output terminal and the third signal output terminal; the present invention realizes two buttons triggering three functions through a simple hardware circuit, which is convenient for the miniaturized design of the product and saves product space. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0029] Figure 1 is a circuit block diagram of a dual-button three-function control circuit in an embodiment of the present invention;

[0030] Figure 2 It is a circuit principle diagram of a dual-button three-function control circuit in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.

[0032] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0033] In the description of the present invention, if there are words such as "several", it means one or more, "more" means more than two, greater than, less than, exceed, etc. are understood as not including the number, and above, below, within, etc. are understood as including the number.

[0034] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0035] refer to Figure 1 , an embodiment of the present invention provides a dual-button three-function control circuit, including: a power supply terminal VCC, a first button S1, a second button S2, a first signal output terminal FUN1, a second signal output terminal FUN2, a third signal output terminal FUN3, a first control circuit 210, a second control circuit 220 and a third control circuit 230;

[0036] The input end of the first button S1 and the input end of the second button S2 are connected to the power supply end VCC, the output end of the first button S1 is connected to the first signal output end FUN1 through the first control circuit 210, the first signal output end FUN1 is connected to the first GPIO pin of the single-chip computer, and the first control circuit 210 is configured so that when the first button S1 is connected to the power supply end VCC, the first control circuit 210 is turned on, and the single-chip computer is triggered to output a first control signal through the first signal output end FUN1;

[0037] The output end of the second button S2 is connected to the second signal output end FUN2 through the second control circuit 220, and the second signal output end FUN2 is connected to the second GPIO pin of the single-chip microcomputer. The second control circuit 220 is configured so that when the second button S2 is connected to the power supply end VCC, the second control circuit 220 is turned on, and the single-chip microcomputer is triggered to output a second control signal through the second signal output end FUN2;

[0038] The two input ends of the third control circuit 230 are respectively connected to the output end of the first button S1 and the output end of the second button S2, the output end of the third control circuit 230 is connected to the third signal output end FUN3, and the third signal output end FUN3 is connected to the third GPIO pin of the single-chip microcomputer. The third control circuit 230 is configured so that when the first button S1 and the second button S2 are simultaneously connected to the power supply end VCC, the first control circuit 210, the second control circuit 220 and the third control circuit 230 are simultaneously turned on, and the single-chip microcomputer is triggered to output the third control signal through the first signal output end FUN1, the second signal output end FUN2 and the third signal output end FUN3.

[0039] The working principle of the dual-button three-function control circuit provided in the embodiment of the present invention is: when the first button S1 is connected to the power supply terminal VCC, the first control circuit 210 is turned on to pull the first signal output terminal FUN1 down to a low level, the first signal output terminal FUN1 outputs a low level, and the single-chip microcomputer is triggered to output a first control signal; when the second button S2 is connected to the power supply terminal VCC, the second control circuit 220 is turned on to pull the second signal output terminal FUN2 down to a low level, triggering the second signal output terminal FUN2 to output a low level, and triggering the single-chip microcomputer to output a second control signal; when the first button S1 and the second button S2 are connected to the power supply terminal VCC at the same time, the first control circuit 210, the second control circuit 220 and the third control circuit 230 are turned on at the same time, and the first signal output terminal FUN1, the second signal output terminal FUN2 and the third signal output terminal FUN3 all output a high level, triggering the single-chip microcomputer to output a third control signal. It can be seen that the present invention realizes three functions triggered by two buttons through a simple hardware circuit, which is convenient for the miniaturized design of the product and saves product space; in addition, compared with the prior art, the dual-button three-function control circuit provided by the present invention does not require software participation and has lower hardware costs.

[0040] refer to Figure 2 As a preferred embodiment of the above embodiment, the first control circuit 210 includes: a first pull-up resistor, a first pull-down resistor and a first transistor Q1, one end of the first pull-up resistor is connected to the power supply terminal VCC, and the other end is respectively connected to the collector of the first transistor Q1 and the first signal output terminal FUN1, one end of the first pull-down resistor is connected to the output end of the first button S1, and the other end is connected to the base of the first transistor Q1, and the emitter of the first transistor Q1 is grounded.

[0041] As a preference of the above embodiment, the first pull-up resistor includes a first resistor R1, and the resistance of the first resistor R1 is 10 kilo-ohms; the first pull-down resistor includes a fourth resistor R4, and the resistance of the fourth resistor R4 is 10 kilo-ohms.

[0042] As a preferred embodiment of the above, the first pull-down resistor further includes a fifth resistor, one end of the fifth resistor is connected to the output end of the first button S1, the other end of the fifth resistor is grounded, and the resistance of the fifth resistor is 1 kilo-ohm. The fifth resistor can ensure the stability of the base of the first transistor Q1 when the second button S2 is pressed.

[0043] As a preferred embodiment of the above embodiment, the second control circuit 220 includes: a second pull-up resistor, a second pull-down resistor and a second transistor Q2, one end of the second pull-up resistor is connected to the power supply terminal VCC, and the other end is respectively connected to the collector of the second transistor Q2 and the second signal output terminal FUN2, one end of the second pull-down resistor is connected to the output terminal of the second button S2, and the other end is connected to the base of the second transistor Q2, and the emitter of the second transistor Q2 is grounded.

[0044] As a preference of the above embodiment, the second pull-up resistor includes a second resistor R2, and the resistance of the second resistor R2 is 10 kilo-ohms; the second pull-down resistor includes a sixth resistor R6, and the resistance of the sixth resistor R6 is 10 kilo-ohms.

[0045] As a preferred embodiment of the above embodiment, the third control circuit 230 includes: a third pull-up resistor, a fourth pull-up resistor, a third pull-down resistor, a voltage dividing resistor, a third transistor Q3, a fourth transistor Q4 and a clamping diode D1; one end of the third pull-up resistor is connected to the power supply terminal VCC, and the other end is respectively connected to the base of the third transistor Q3 and one end of the voltage dividing resistor, the emitter of the third transistor Q3 is connected to the power supply terminal VCC, and the collector of the third transistor Q3 is connected to the third signal output terminal FUN3; the other end of the voltage dividing resistor is connected to the collector of the fourth transistor Q4, the emitter of the fourth transistor Q4 is grounded, the base of the fourth transistor Q4 is respectively connected to one end of the fourth pull-up resistor and the anode of the clamping diode D1, the other end of the fourth pull-up resistor is connected to the output end of the first button S1, the cathode of the clamping diode D1 is connected to one end of the third pull-down resistor, and the other end of the third pull-down resistor is grounded. The clamping diode D1 can ensure that the first button S1 and the second button S2 are pressed at the same time, and the base of the fourth transistor Q4 is at a high level.

[0046] As a preference of the above embodiment, the collector of the third transistor Q3 is further connected to a grounding resistor, and the other end of the grounding resistor is grounded.

[0047] As a preferred embodiment of the above embodiment, the third pull-up resistor includes a third resistor R3, and the resistance of the third resistor R3 is 10 kilo-ohms; the fourth pull-up resistor includes a seventh resistor R7, and the resistance of the seventh resistor R7 is 10 kilo-ohms; the third pull-down resistor includes a tenth resistor R10, and the resistance of the tenth resistor R10 is 1 kilo-ohm; the voltage-dividing resistor includes a ninth resistor R9, and the resistance of the ninth resistor R9 is 10 kilo-ohms; the grounding resistor includes an eighth resistor R8, and the resistance of the eighth resistor R8 is 10 kilo-ohms.

[0048] As a preference of the above embodiment, the first transistor Q1 , the second transistor Q2 and the fourth transistor Q4 are NPN transistors; and the third transistor Q3 is a PNP transistor.

[0049] The present application provides a dual-button three-function control circuit, using a first button S1 and a second button S2, and the target requirements to be achieved are:

[0050] Function 1: The first button S1 triggers the first signal output terminal FUN1 to generate a low level and output a first control signal;

[0051] Function 2: The second button S2 triggers the second signal output terminal FUN2 to generate a low level and output a second control signal;

[0052] Function 3: When the first button S1 and the second button S2 are pressed simultaneously, the third signal output terminal FUN3 will be triggered to generate a high level and output a third control signal;

[0053] The working principle of the double-button three-function control circuit provided in the application is explained below:

[0054] In the initial state, because the first transistor Q1 is pulled down by the fourth resistor R4 and the fifth resistor R5, the first transistor Q1 is not conducting, and the first signal output terminal FUN1 is pulled up by the first resistor R1; similarly, because the second transistor Q2 is pulled down by the sixth resistor R6 and the tenth resistor R10, the second transistor Q2 is not conducting, and the second signal output terminal FUN2 is pulled up by the second resistor R2. Because the anode of the clamping diode D1 is pulled down by the fifth resistor R5 and the seventh resistor R7, and the cathode of the clamping diode D1 is pulled down by the sixth resistor R6 and the tenth resistor R10, the base of the fourth transistor Q4 is at a low level, the fourth transistor Q4 is not conducting, the base of the third transistor Q3 is pulled up by the third resistor R3, the third transistor Q3 is not conducting, and the third signal output terminal FUN3 is pulled down.

[0055] Case 1: Trigger the first button S1 to implement function 1:

[0056] When the first button S1 is connected to the power supply terminal VCC, the first transistor Q1 is turned on, the first signal output terminal FUN1 is pulled low, and the first signal output terminal FUN1 is triggered to output the first control signal. Because the second transistor Q2 is pulled down by the sixth resistor R6 and the tenth resistor R10, the second transistor Q2 is not turned on, and the second signal output terminal FUN2 is pulled up by the second resistor R2. The base voltage of the fourth transistor Q4 is divided by the power supply terminal VCC through the seventh resistor R7, the clamping diode D1, and the tenth resistor R10. Since the tenth resistor R10 has a low resistance value, the base voltage of the fourth transistor Q4 is also low, the fourth transistor Q4 is not turned on, the base of the third transistor Q3 is pulled up by the third resistor R3, the third transistor Q3 is not turned on, and the third signal output terminal FUN3 is pulled low.

[0057] Case 2: Trigger the second button S2 to implement function 2:

[0058] When the second button S2 is triggered, the base of the second transistor Q2 is directly connected to the power supply terminal VCC at a high level, the second transistor Q2 is turned on, the second signal output terminal FUN2 is pulled low, and the single-chip microcomputer is triggered to output the second control signal through the second signal output terminal. Because the first transistor Q1 is pulled down by the fourth resistor R4 and the fifth resistor R5, the first transistor Q1 is not turned on, and the first signal output terminal FUN1 is pulled up by the first resistor R1. Due to the presence of the clamping diode D1, the base of the second transistor Q2 is at a high level, but it does not affect the base of the fourth transistor Q4. The base voltage of the fourth transistor Q4 is pulled down to a low level by the fifth resistor R5 and the seventh resistor R7, the fourth transistor Q4 is not turned on, the base of the fourth transistor Q4 is pulled up by the third resistor R3, the third transistor Q3 is not turned on, and the third signal output terminal FUN3 is pulled low.

[0059] Case 3: The first button S1 and the second button S2 are triggered simultaneously to implement function 3:

[0060] When the first button S1 is triggered, the base of the first transistor Q1 is directly connected to the power supply terminal VCC and is at a high level; similarly, when the second button S2 is triggered, the base of the second transistor Q2 is directly connected to the power supply terminal VCC and is at a high level. Since the cathode of the clamping diode D1 is directly connected to the power supply terminal VCC by the first button S1 and is at a high level, and the anode of the clamping diode D1 is pulled up to a high level by the seventh resistor R7, the base voltage of the fourth transistor Q4 is high, and the fourth transistor Q4 is turned on. Therefore, the base voltage of the third transistor Q3 is divided by the power supply terminal VCC through the third resistor R3 and the ninth resistor R9, and the third transistor Q3 meets the turn-on condition, and the third signal output terminal FUN3 is directly connected to the power supply terminal VCC and is high, triggering the third signal output terminal FUN3 to generate a high level and output the third control signal.

[0061] In addition, an embodiment of the present invention provides a two-button three-function control method, which is applied to the two-button three-function control circuit described in any of the above embodiments, and the method includes the following steps:

[0062] Step S100, initializing the single chip microcomputer;

[0063] Step S200, the single chip microcomputer detects the level of the first GPIO pin, the level of the second GPIO pin and the level of the third GPIO pin in real time; wherein the first GPIO pin is connected to the first signal output terminal FUN1, the second GPIO pin is connected to the second signal output terminal FUN2, and the third GPIO pin is connected to the third signal output terminal FUN3;

[0064] Step S300, when the first button S1 is connected to the power supply terminal VCC, execute step S400; when the second button S2 is connected to the power supply terminal VCC, execute step S500; when the first button S1 and the second button S2 are connected to the power supply terminal VCC at the same time, execute step S600;

[0065] Step S400, in response to the action of the first button S1 connecting to the power supply terminal VCC, the single chip microcomputer detects the low level output by the first signal output terminal FUN1 through the first GPIO pin, triggering the first control signal;

[0066] Step S500, in response to the action of the second button S2 turning on the power supply terminal VCC, the single chip microcomputer detects the low level output by the second signal output terminal FUN2 through the second GPIO pin, triggering the second control signal;

[0067] Step S600, in response to the action of the first button S1 and the second button S2 simultaneously connecting to the power supply terminal VCC, the single chip detects the high level output by the first signal output terminal FUN1 through the first GPIO pin, detects the high level output by the second signal output terminal FUN2 through the second GPIO pin, and detects the high level output by the third signal output terminal FUN3 through the third GPIO pin, thereby triggering the third control signal.

[0068] Although the description of the present invention has been described in considerable detail and in particular with respect to several embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but rather should be considered to be interpreted broadly by reference to the appended claims, taking into account the prior art, to effectively cover the intended scope of the present invention. In addition, the above description of the present invention is based on the embodiments foreseeable by the inventors, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that have not yet been foreseen may still represent equivalent changes to the present invention.

Claims

1. A two-button three-function control circuit, characterized in that: include: A power supply terminal, a first button, a second button, a first signal output terminal, a second signal output terminal, a third signal output terminal, a first control circuit, a second control circuit and a third control circuit; The input end of the first button and the input end of the second button are commonly connected to the power supply end, the output end of the first button is connected to the first signal output end through the first control circuit, the first signal output end is connected to the first GPIO pin of the single-chip computer, and the first control circuit is configured so that when the first button is connected to the power supply end, the first control circuit is turned on, and the single-chip computer is triggered to output a first control signal through the first signal output end; The output end of the second button is connected to the second signal output end through the second control circuit, and the second signal output end is connected to the second GPIO pin of the single-chip microcomputer. The second control circuit is configured so that when the second button is connected to the power supply end, the second control circuit is turned on and triggers the single-chip microcomputer to output a second control signal through the second signal output end; The two input ends of the third control circuit are respectively connected to the output end of the first button and the output end of the second button, the output end of the third control circuit is connected to the third signal output end, and the third signal output end is connected to the third GPIO pin of the single-chip microcomputer. The third control circuit is configured so that when the first button and the second button are connected to the power supply end at the same time, the first control circuit, the second control circuit and the third control circuit are turned on at the same time, and the single-chip microcomputer is triggered to output a third control signal through the first signal output end, the second signal output end and the third signal output end; The third control circuit includes: a third pull-up resistor, a fourth pull-up resistor, a third pull-down resistor, a voltage dividing resistor, a third transistor, a fourth transistor and a clamping diode; One end of the third pull-up resistor is connected to the power supply end, and the other end is respectively connected to the base of the third transistor and one end of the voltage-dividing resistor, the emitter of the third transistor is connected to the power supply end, and the collector of the third transistor is connected to the third signal output end; the other end of the voltage-dividing resistor is connected to the collector of the fourth transistor, the emitter of the fourth transistor is grounded, the base of the fourth transistor is respectively connected to one end of the fourth pull-up resistor and the anode of the clamping diode, the other end of the fourth pull-up resistor is connected to the output end of the first button, the cathode of the clamping diode and the output end of the second button are commonly connected to one end of the third pull-down resistor, and the other end of the third pull-down resistor is grounded.

2. A two-button three-function control circuit according to claim 1, characterized in that: The first control circuit includes: a first pull-up resistor, a first pull-down resistor and a first transistor, one end of the first pull-up resistor is connected to the power supply end, and the other end is respectively connected to the collector of the first transistor and the first signal output end, one end of the first pull-down resistor is connected to the output end of the first button, and the other end is connected to the base of the first transistor, and the emitter of the first transistor is grounded.

3. A two-button three-function control circuit according to claim 2, characterized in that: The first pull-up resistor includes a first resistor; and the first pull-down resistor includes a fourth resistor.

4. A two-button three-function control circuit according to claim 2, characterized in that: The first pull-down resistor further includes a fifth resistor, one end of the fifth resistor is connected to the output end of the first button, and the other end of the fifth resistor is grounded.

5. A two-button three-function control circuit according to claim 1, characterized in that: The second control circuit includes: a second pull-up resistor, a second pull-down resistor and a second transistor, one end of the second pull-up resistor is connected to the power supply end, and the other end is respectively connected to the collector of the second transistor and the second signal output end, one end of the second pull-down resistor is connected to the output end of the second button, and the other end is connected to the base of the second transistor, and the emitter of the second transistor is grounded.

6. A two-button three-function control circuit according to claim 1, characterized in that: The collector of the third transistor is also connected to a grounding resistor, and the other end of the grounding resistor is grounded.

7. A two-button three-function control method, applied to the two-button three-function control circuit according to any one of claims 1 to 6, characterized in that: The method comprises the following steps: Step S100, initializing the single chip microcomputer; Step S200, the single-chip microcomputer detects the level of the first GPIO pin, the level of the second GPIO pin and the level of the third GPIO pin in real time; wherein the first GPIO pin is connected to the first signal output end, the second GPIO pin is connected to the second signal output end, and the third GPIO pin is connected to the third signal output end; Step S300, when the first button is connected to the power supply end, execute step S400; when the second button is connected to the power supply end, execute step S500; when the first button and the second button are connected to the power supply end at the same time, execute step S600; Step S400, in response to the action of the first button connecting to the power supply terminal, the single chip microcomputer detects the low level output by the first signal output terminal through the first GPIO pin, and triggers the first control signal; Step S500, in response to the action of the second button connecting to the power supply terminal, the single chip microcomputer detects the low level output by the second signal output terminal through the second GPIO pin, and triggers the second control signal; Step S600, in response to the action of the first button and the second button simultaneously connecting to the power supply terminal, the single-chip computer detects the high level output by the first signal output terminal through the first GPIO pin, detects the high level output by the second signal output terminal through the second GPIO pin, and detects the high level output by the third signal output terminal through the third GPIO pin, thereby triggering the third control signal.

Citation Information

Patent Citations

  • Remote controller and method for controlling host computer to get into downloading mode with the same

    CN107479919A