Key multiplexing circuit and electronic equipment
By configuring a key voltage divider branch for each key and connecting it to the controller via a shared pin, and using voltage divider resistors of different resistance values to identify key operations, the problem of multiple keys occupying MCU pin resources is solved, achieving the effects of saving resources and expanding functionality.
Patent Information
- Application Number
- CN202422851127.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2034-11-22
AI Technical Summary
In the existing technology, multiple buttons require multiple I/O pin resources of the microcontroller unit (MCU), resulting in excessive resource consumption or a lack of I/O pins when expanding the button layout.
A key multiplexing circuit is adopted. By configuring a key voltage divider branch for each key, each key voltage divider branch is connected to the key of the controller. By using voltage divider resistors with different resistance values, each key generates a different voltage signal so that the controller can recognize the key operation.
It saves controller pin resources, supports the diversification and expansion of button functions, reduces product design and manufacturing costs, helps product miniaturization and convenience, and improves user experience.
Smart Images

Figure CN223502847U_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of circuit design technology, and more particularly to a key multiplexing circuit and an electronic device configured with the key multiplexing circuit. Background Technology
[0002] Buttons are the most commonly used interactive elements in electronic devices and are the primary means of operation and control. Buttons can come in various types, such as push buttons and touch buttons.
[0003] In practical applications, considering factors such as product size and cost, it is often necessary to use the simplest possible button circuit to implement the corresponding functions. Generally, the most common way to operate buttons is by directly driving them using a microcontroller unit (MCU). In related technologies, each button is connected to one input / output (I / O) pin of the MCU. This is the simplest button circuit. However, if the electronic device is equipped with multiple buttons, each button requires the corresponding number of I / O pins in the MCU, resulting in high resource consumption. Alternatively, during product upgrades, there may be situations where several buttons need to be added, but the MCU does not have enough spare I / O pins. This may lead to the need to reselect the MCU (e.g., choose a larger MCU), as well as significant modifications to the corresponding program design and large-scale changes to the circuit board. Therefore, the above button circuit is not suitable for applications with a large number of buttons and limited I / O pin resources in the MCU. Utility Model Content
[0004] In view of the shortcomings of the above-mentioned related technologies, the purpose of this disclosure is to provide a key multiplexing circuit and an electronic device configured with the key multiplexing circuit, so as to solve the various problems in the related technologies.
[0005] The first aspect of this disclosure provides a key multiplexing circuit, including: a power supply, multiple keys, and multiple key voltage divider branches corresponding one-to-one with the multiple keys, wherein the multiple key voltage divider branches are connected in parallel to the power supply, each key is connected to a common pin of the controller through a corresponding key voltage divider branch, each key voltage divider branch includes a voltage divider resistor, and the resistance values of the voltage divider resistors in the multiple key voltage divider branches are different from each other.
[0006] In some examples of the first aspect, the plurality of button voltage divider branches are connected to the power supply via pull-up resistors.
[0007] In some examples of the first aspect, if the number of buttons is n, where n is a positive integer; wherein the first button is connected to the common button pin of the controller through a first button voltage divider branch, the first button voltage divider branch including a first voltage divider resistor; the second button is connected to the common button pin of the controller through a second button voltage divider branch, the second button voltage divider branch including a second voltage divider resistor; ..., the nth button is connected to the common button pin of the controller through an nth button voltage divider branch, the nth button voltage divider branch including an nth voltage divider resistor; the resistance values of the first voltage divider resistor, the second voltage divider resistor, ..., and the nth voltage divider resistor are all different.
[0008] In some examples of the first aspect, if the number of buttons is n, where n is a positive integer; wherein, the first button is connected to the common button pin of the controller through a first button voltage divider branch, the first button voltage divider branch including a first voltage divider resistor; the second button is connected to the common button pin of the controller through a second button voltage divider branch, the second button voltage divider branch including a first voltage divider resistor and a non-zero second voltage divider resistor; ..., the nth button is connected to the common button pin of the controller through an nth button voltage divider branch, the nth button voltage divider branch including a first voltage divider resistor, a non-zero second voltage divider resistor, ..., and a non-zero nth voltage divider resistor.
[0009] In some examples of the first aspect, the voltage divider resistor comprises a single resistor or a group of resistors.
[0010] In some examples of the first aspect, a current-limiting resistor is provided between the parallel terminals of the plurality of button voltage divider branches and the button common pin of the controller.
[0011] In some examples of the first aspect, a grounded filter capacitor is provided between the current-limiting resistor and the shared pin of the controller's buttons.
[0012] In some examples of the first aspect, the controller is a microcontroller unit (MCU).
[0013] A second aspect of this disclosure provides an electronic device, including: a controller and a key multiplexing circuit as described above.
[0014] As described above, embodiments of this disclosure provide a key multiplexing circuit and an electronic device. The key multiplexing circuit includes a power supply, multiple keys, and multiple key voltage divider branches corresponding to each key. The multiple key voltage divider branches are connected in parallel to the power supply. Each key is connected to a common key pin of the controller through its corresponding key voltage divider branch. Each key voltage divider branch includes a voltage divider resistor, and the resistance values of the voltage divider resistors in the multiple key voltage divider branches are different. This allows multiple keys to be connected to a common control pin of the controller through their respective key voltage divider branches, significantly saving the controller's input / output pin resources. This provides favorable conditions for the diversification or expansion of key functions, reduces product design and manufacturing costs, promotes product miniaturization, convenience, and simplicity, and improves the user experience. Attached Figure Description
[0015] Figure 1 The diagram shown is a circuit schematic of a key multiplexing circuit according to one embodiment of the present disclosure.
[0016] Figure 2 Displayed as Figure 1 The circuit diagram of the key multiplexing circuit in a variation example.
[0017] Figure 3 The diagram shown is a circuit diagram of the key multiplexing circuit of this disclosure in another embodiment.
[0018] Figure 4 Displayed as Figure 3 The circuit diagram of the key multiplexing circuit in a variation example.
[0019] Figure 5 Displayed as Figure 3 The circuit diagram of the key multiplexing circuit in another variation is shown. Detailed Implementation
[0020] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the information disclosed herein. This disclosure can also be implemented or applied through other different specific embodiments, and various details in this disclosure can be modified or changed according to different viewpoints and application modules without departing from the spirit of this disclosure. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this disclosure can be combined with each other.
[0021] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings, so that those skilled in the art to which this disclosure pertains can readily implement it. This disclosure may be embodied in many different forms and is not limited to the embodiments described herein.
[0022] In this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic represented in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics represented may be combined in any suitable manner in any one or a group of embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples represented in this disclosure, as well as the features of those different embodiments or examples.
[0023] Furthermore, the terms "first" and "second" are used for illustrative purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the representation of this disclosure, "a set" means two or more, unless otherwise explicitly specified.
[0024] For the purpose of clarity, devices unrelated to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.
[0025] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.
[0026] While the terms first, second, etc., are used in some examples herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, step, operation, element, module, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, modules, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0027] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this disclosure. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in this specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.
[0028] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the message of the present disclosure, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.
[0029] In related button circuit technology, each button is connected to one input / output (I / O) pin of the microcontroller unit (MCU). Multiple buttons require the use of a corresponding number of I / O pins in the MCU, which results in high resource consumption. Alternatively, the MCU may not have enough extra I / O pins to expand the number of buttons.
[0030] In view of this, the present disclosure provides a key multiplexing circuit and an electronic device configured with the key multiplexing circuit. In the key multiplexing circuit, a corresponding key voltage divider branch is configured for each key. Each key voltage divider branch is connected in parallel and is connected to the key common pin of the controller. This allows multiple keys to share the key common pin of the controller. Compared with related technologies, this saves the pin resources of the controller and provides favorable conditions for the diversification or expansion of key functions.
[0031] Please see Figure 1 The diagram shown is a circuit diagram of the key multiplexing circuit of this disclosure in one embodiment.
[0032] like Figure 1 As shown, the key multiplexing circuit in this embodiment may include: a power supply, multiple keys, and multiple key voltage divider branches.
[0033] The key multiplexing circuit is applicable to various electronic devices involving key control, such as common audio-visual playback devices or other devices. For example, the audio-visual playback device may be a radio, CD player, etc.; for example, the other device may be a portable air pump, sweeper, cleaning machine, etc.
[0034] Taking a portable air pump as an example, the portable air pump uses an internal motor to drive the piston or diaphragm of a cylinder, utilizing atmospheric pressure for inflation and deflation. During inflation, the valve of the communicating vessel is closed by the air pressure inside the pump chamber, and the gas is compressed and enters the tire or other items requiring inflation through the air tube. During deflation, the valve of the communicating vessel is opened by atmospheric pressure, and gas enters the pump chamber. Portable air pumps are widely used in gas sampling, gas circulation, vacuum adsorption, accelerated filtration, automotive vacuum booster, and other applications, and also have wide applications in medical, health, scientific research, and environmental protection fields.
[0035] The portable air pump may be equipped with multiple buttons for control. For example, these buttons may include a power button, an inflation / deflation mode button, a power increase button, a power decrease button, etc.
[0036] exist Figure 1 In the illustrated embodiment, the electronic device may be configured with five buttons, respectively labeled as first button SW11, second button SW12, third button SW13, fourth button SW14, and fifth button SW15. Therefore, the button multiplexing circuit includes five button voltage divider branches corresponding to the five buttons, respectively labeled as the first button voltage divider branch corresponding to the first button SW11, the second button voltage divider branch corresponding to the second button SW12, the third button voltage divider branch corresponding to the third button SW13, the fourth button voltage divider branch corresponding to the fourth button SW14, and the fifth button voltage divider branch corresponding to the fifth button SW15.
[0037] These multiple button voltage divider branches are connected in parallel to the power supply. Each button is connected to a common pin of the controller's buttons through a corresponding button voltage divider branch, and each button voltage divider branch includes a voltage divider resistor. In some examples, the voltage divider resistor is a single resistor.
[0038] In some examples, the voltage divider resistor is a group of resistors.
[0039] In some embodiments, the controller 1 may be a micro-controller unit (MCU).
[0040] If the number of buttons is n (n is a positive integer), the first button is connected to the common pin of the controller's buttons through a first button voltage divider branch, which includes a first voltage divider resistor. The second button is connected to the common pin of the controller's buttons through a second button voltage divider branch, which includes a second voltage divider resistor, and so on. The nth button is connected to the common pin of the controller's buttons through an nth button voltage divider branch, which includes an nth voltage divider resistor. The resistance values of the first voltage divider resistor, the second voltage divider resistor, and so on, as well as the nth voltage divider resistor, are all different.
[0041] exist Figure 1 In the embodiment shown, the first button SW11 is connected to the common button pin 11 of the controller 1 through the first button voltage divider branch. That is, the first end of the first button voltage divider branch is grounded through the first button SW11, and the second end of the first button voltage divider branch is connected to the common button pin 11 of the controller 1 through the first voltage divider resistor R11.
[0042] The second button SW12 is connected to the common button pin 11 of the controller 1 through the second button voltage divider branch. That is, the first end of the second button voltage divider branch is grounded through the second button SW12, and the second end of the second button voltage divider branch is connected to the common button pin 11 of the controller 1 through the second voltage divider resistor R12.
[0043] The third button SW13 is connected to the common button pin 11 of the controller 1 through the third button voltage divider branch. That is, the first end of the third button voltage divider branch is grounded through the third button SW13, and the second end of the third button voltage divider branch is connected to the common button pin 11 of the controller 1 through the third voltage divider resistor R13.
[0044] The fourth button SW14 is connected to the common button pin 11 of the controller 1 through the fourth button voltage divider branch. That is, the first end of the fourth button voltage divider branch is grounded through the fourth button SW14, and the second end of the fourth button voltage divider branch is connected to the common button pin 11 of the controller 1 through the fourth voltage divider resistor R14.
[0045] The fifth button SW15 is connected to the common button pin 11 of the controller 1 through the fifth button voltage divider branch. That is, the first end of the fifth button voltage divider branch is grounded through the fifth button SW15, and the second end of the fifth button voltage divider branch is connected to the common button pin 11 of the controller 1 through the first voltage divider resistor R11.
[0046] Furthermore, the multiple button voltage divider branches are connected to the power supply via pull-up resistors. Figure 1In the embodiment shown, the parallel terminals of the first button voltage divider branch, the second button voltage divider branch, the third button voltage divider branch, the fourth button voltage divider branch, and the fifth button voltage divider branch are connected to the power supply VCC through pull-up resistors Rp.
[0047] The resistance values of the first voltage divider resistor R11 in the first button voltage divider branch, the second voltage divider resistor R12 in the second button voltage divider branch, the third voltage divider resistor R13 in the third button voltage divider branch, the fourth voltage divider resistor R14 in the fourth button voltage divider branch, and the fifth voltage divider resistor R15 in the fifth button voltage divider branch are all different. Therefore, when the first button SW11, the second button SW12, the third button SW13, the fourth button SW14, and the fifth button SW15 are pressed, the corresponding first button voltage divider branch, second button voltage divider branch, third button voltage divider branch, and fifth button voltage divider branch will all be activated. The voltage signals generated by the first button SW11, the second button SW12, the third button SW13, the fourth button SW14, and the fifth button SW15 are all different. Specifically, the first voltage signal generated on the first button's voltage divider branch after the first button SW11 is activated, the second voltage signal generated on the second button's voltage divider branch after the second button SW12 is activated, the third voltage signal generated on the third button's voltage divider branch after the third button SW13 is activated, the fourth voltage signal generated on the fourth button's voltage divider branch after the fourth button SW14 is activated, and the fifth voltage signal generated on the fifth button's voltage divider branch after the fifth button SW15 is activated are all different. Therefore, the controller 1 can determine which button was activated based on the voltage signal received through the button's common pin 11, and execute the corresponding function operation based on the determination result.
[0048] Furthermore, in some embodiments, a current-limiting resistor is provided between the parallel terminals of the plurality of button voltage divider branches and the button common pin of the controller.
[0049] Please see Figure 2 Displayed as Figure 1 The circuit diagram of the key multiplexing circuit in a variation example.
[0050] like Figure 2 As shown, a current-limiting resistor R is provided between the parallel terminals of the first button voltage divider branch, the second button voltage divider branch, the third button voltage divider branch, the fourth button voltage divider branch, and the fifth button voltage divider branch and the button common pin 11 of the controller 1. L ,
[0051] Furthermore, a grounded filter capacitor is provided between the current-limiting resistor and the shared pin of the controller's buttons. For example... Figure 2 As shown, the current-limiting resistor R L A grounded filter capacitor C is provided between the button and pin 11 of controller 1. LThus, the filter capacitor C can be used. L The voltage input to the button's common pin 11 is filtered.
[0052] Please see Figure 3 The diagram shown is a circuit diagram of the key multiplexing circuit of this disclosure in another embodiment.
[0053] like Figure 3 As shown, the key multiplexing circuit in this embodiment may include: a power supply, multiple keys, and multiple key voltage divider branches.
[0054] exist Figure 3 In the illustrated embodiment, the electronic device may be configured with five buttons, respectively labeled as first button SW21, second button SW22, third button SW23, fourth button SW24, and fifth button SW25. Therefore, the button multiplexing circuit includes five button voltage divider branches corresponding to the five buttons, respectively labeled as the first button voltage divider branch corresponding to the first button SW21, the second button voltage divider branch corresponding to the second button SW22, the third button voltage divider branch corresponding to the third button SW23, the fourth button voltage divider branch corresponding to the fourth button SW24, and the fifth button voltage divider branch corresponding to the fifth button SW25.
[0055] These multiple button voltage divider branches are connected in parallel to the power supply. Each button is connected to a common pin of the controller's buttons through a corresponding button voltage divider branch, and each button voltage divider branch includes a voltage divider resistor. In some examples, the voltage divider resistor is a single resistor.
[0056] In some examples, the voltage divider resistor is a group of resistors.
[0057] In some embodiments, the controller 2 may be a micro-controller unit (MCU).
[0058] If the number of buttons is n (n is a positive integer), the first button is connected to the common pin of the controller's buttons through the first button voltage divider branch, which includes a first voltage divider resistor. The second button is connected to the common pin of the controller's buttons through the second button voltage divider branch, which includes a first voltage divider resistor and a non-zero second voltage divider resistor, and so on. The nth button is connected to the common pin of the controller's buttons through the nth button voltage divider branch, which includes a first voltage divider resistor, a non-zero second voltage divider resistor, and so on, as well as a non-zero nth voltage divider resistor.
[0059] exist Figure 3In the embodiment shown, the first button SW21 is connected to the common button pin 21 of the controller 2 through the first button voltage divider branch. That is, the first end of the first button voltage divider branch is grounded through the first button SW21, and the second end of the first button voltage divider branch is connected to the common button pin 21 of the controller 2 through the first voltage divider resistor R21.
[0060] The second button SW22 is connected to the button common pin 21 of the controller 2 through the second button voltage divider branch. That is, the first end of the second button voltage divider branch is grounded through the second button SW22, and the second end of the second button voltage divider branch is connected to the button common pin 21 of the controller 2 through the series non-zero second voltage divider resistor R22 and the first voltage divider resistor R21.
[0061] The third button SW23 is connected to the button common pin 21 of the controller 2 through the third button voltage divider branch. That is, the first end of the third button voltage divider branch is grounded through the third button SW23, and the second end of the third button voltage divider branch is connected to the button common pin 21 of the controller 2 through a series of non-zero third voltage divider resistor R23, non-zero second voltage divider resistor R22, and first voltage divider resistor R21.
[0062] The fourth button SW24 is connected to the button common pin 21 of the controller 2 through the fourth button voltage divider branch. That is, the first end of the fourth button voltage divider branch is grounded through the fourth button SW24, and the second end of the fourth button voltage divider branch is connected to the button common pin 21 of the controller 2 through a series of non-zero fourth voltage divider resistor R24, non-zero third voltage divider resistor R23, non-zero second voltage divider resistor R22, and first voltage divider resistor R21.
[0063] The fifth button SW25 is connected to the common button pin 21 of the controller 2 through the fifth button voltage divider branch. That is, the first end of the fifth button voltage divider branch is grounded through the fifth button SW25, and the second end of the fifth button voltage divider branch is connected to the common button pin 21 of the controller 2 through a series of non-zero fifth voltage divider resistor R25, non-zero fourth voltage divider resistor R24, non-zero third voltage divider resistor R23, non-zero second voltage divider resistor R22, and first voltage divider resistor R21.
[0064] Furthermore, the multiple button voltage divider branches are connected to the power supply via pull-up resistors. Figure 3 In the embodiment shown, the parallel terminals of the first button voltage divider branch, the second button voltage divider branch, the third button voltage divider branch, the fourth button voltage divider branch, and the fifth button voltage divider branch are connected to the power supply VCC through pull-up resistors Rp.
[0065] The first button voltage divider branch includes a first voltage divider resistor R21; the second button voltage divider branch includes a first voltage divider resistor R21 and a non-zero second voltage divider resistor R22; the third button voltage divider branch includes a first voltage divider resistor R21, a non-zero second voltage divider resistor R22, and a non-zero third voltage divider resistor R23; and the fourth button voltage divider branch includes a first voltage divider resistor R21, a non-zero second voltage divider resistor R22, a non-zero third voltage divider resistor R23, and a non-zero fourth voltage divider resistor R24. The fifth button voltage divider branch includes a first voltage divider resistor R21, a non-zero second voltage divider resistor R22, a non-zero third voltage divider resistor R23, a non-zero fourth voltage divider resistor R24, and a non-zero fifth voltage divider resistor R25. Thus, the resistance values of the voltage divider resistors in the first, second, third, fourth, and fifth button voltage divider branches are all different. Therefore, when the first button SW21, the second button SW22, the third button SW23, the fourth button SW24, and the fifth button SW25 are pressed, the voltage signals generated by the corresponding voltage divider branches of the first, second, third, fourth, and fifth buttons are different. Specifically, the first voltage signal generated on the first button voltage divider branch after the first button SW21 is pressed, the second voltage signal generated on the second button voltage divider branch after the second button SW22 is pressed, the third voltage signal generated on the third button voltage divider branch after the third button SW23 is pressed, the fourth voltage signal generated on the fourth button voltage divider branch after the fourth button SW24 is pressed, and the fifth voltage signal generated on the fifth button voltage divider branch after the fifth button SW25 is pressed are all different. Thus, the controller 2 can determine which button was pressed based on the voltage signal received through the button common pin 21, and execute the corresponding function operation based on the determination result.
[0066] Furthermore, in some embodiments, the first voltage divider resistor R21 in the first button voltage divider branch may be zero. See also... Figure 4 Displayed as Figure 3 The circuit diagram of the key multiplexing circuit in a variation is shown below. Figure 4 As shown, the first voltage divider resistor R21 in the first button voltage divider branch can be zero, that is, the first button SW21 is directly connected to the button common pin 21 of the controller 2.
[0067] Furthermore, in some embodiments, a current-limiting resistor is provided between the parallel terminals of the plurality of button voltage divider branches and the button common pin of the controller.
[0068] Please see Figure 5 Displayed as Figure 3The circuit diagram of the key multiplexing circuit in another variation is shown.
[0069] like Figure 5 As shown, a current-limiting resistor R is provided between the parallel terminals of the first button voltage divider branch, the second button voltage divider branch, the third button voltage divider branch, the fourth button voltage divider branch, and the fifth button voltage divider branch and the button common pin 21 of the controller 2. L ,
[0070] Furthermore, a grounded filter capacitor is provided between the current-limiting resistor and the shared pin of the controller's buttons. For example... Figure 5 As shown, the current-limiting resistor R L A grounded filter capacitor C is provided between the button and the shared pin 21 of controller 2. L Thus, the filter capacitor C can be used. L The voltage input to the button's common pin 21 is filtered.
[0071] As described above, embodiments of this disclosure provide a key multiplexing circuit and an electronic device. The key multiplexing circuit includes a power supply, multiple keys, and multiple key voltage divider branches corresponding to each key. The multiple key voltage divider branches are connected in parallel to the power supply. Each key is connected to a common key pin of the controller through its corresponding key voltage divider branch. Each key voltage divider branch includes a voltage divider resistor, and the resistance values of the voltage divider resistors in the multiple key voltage divider branches are different. This allows multiple keys to be connected to a common control pin of the controller through their respective key voltage divider branches, significantly saving the controller's input / output pin resources. This provides favorable conditions for the diversification or expansion of key functions, reduces product design and manufacturing costs, promotes product miniaturization, convenience, and simplicity, and improves the user experience.
[0072] The above embodiments are merely illustrative of the principles and effects of this disclosure and are not intended to limit this disclosure. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this disclosure. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this disclosure should still be covered by the protection scope of this disclosure.
Claims
1. A key multiplexing circuit, characterized in that, include: The system includes a power supply, multiple buttons, and multiple button voltage divider branches corresponding to each button. The multiple button voltage divider branches are connected in parallel to the power supply. Each button is connected to the controller's button via a corresponding button voltage divider branch. Each button voltage divider branch includes a voltage divider resistor, and the resistance values of the voltage divider resistors in the multiple button voltage divider branches are different. If the number of buttons is n, where n is a positive integer; wherein, the first button is connected to the common pin of the controller's buttons through a first button voltage divider branch, the first button voltage divider branch including a first voltage divider resistor; the second button is connected to the common pin of the controller's buttons through a second button voltage divider branch, the second button voltage divider branch including a first voltage divider resistor and a non-zero second voltage divider resistor, ...; the nth button is connected to the common pin of the controller's buttons through an nth button voltage divider branch, the nth button voltage divider branch including a first voltage divider resistor, a non-zero second voltage divider resistor, ..., and a non-zero nth voltage divider resistor.
2. The key multiplexing circuit according to claim 1, characterized in that, The multiple button voltage divider branches are connected to the power supply via pull-up resistors.
3. The key multiplexing circuit according to claim 1, characterized in that, If the number of buttons is n, where n is a positive integer; wherein the first button is connected to the common pin of the controller's buttons through a first button voltage divider branch, the first button voltage divider branch including a first voltage divider resistor; the second button is connected to the common pin of the controller's buttons through a second button voltage divider branch, the second button voltage divider branch including a second voltage divider resistor; and so on, the nth button is connected to the common pin of the controller's buttons through an nth button voltage divider branch, the nth button voltage divider branch including an nth voltage divider resistor; the resistance values of the first voltage divider resistor, the second voltage divider resistor, and so on, and the nth voltage divider resistor are all different.
4. The key multiplexing circuit according to claim 1, characterized in that, The voltage divider resistor includes a single resistor or a group of resistors.
5. The key multiplexing circuit according to claim 1, characterized in that, A current-limiting resistor is provided between the parallel terminals of the multiple button voltage divider branches and the shared pin of the controller buttons.
6. The key multiplexing circuit according to claim 5, characterized in that, A grounded filter capacitor is provided between the current-limiting resistor and the shared pin of the controller's buttons.
7. The key multiplexing circuit according to claim 1, characterized in that, The controller is a microcontroller unit (MCU).
8. An electronic device, characterized in that, include: Controller; as well as The key multiplexing circuit as described in any one of claims 1 to 7.