CN220650833U - Key detection circuit - Google Patents

Key detection circuit Download PDF

Info

Publication number
CN220650833U
CN220650833U CN202322273304.2U CN202322273304U CN220650833U CN 220650833 U CN220650833 U CN 220650833U CN 202322273304 U CN202322273304 U CN 202322273304U CN 220650833 U CN220650833 U CN 220650833U
Authority
CN
China
Prior art keywords
key
resistor
mcu
pin
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202322273304.2U
Other languages
Chinese (zh)
Inventor
李武彪
巫俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongshan Liangchenzi Electric Appliance Co ltd
Original Assignee
Zhongshan Liangchenzi Electric Appliance Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongshan Liangchenzi Electric Appliance Co ltd filed Critical Zhongshan Liangchenzi Electric Appliance Co ltd
Priority to CN202322273304.2U priority Critical patent/CN220650833U/en
Application granted granted Critical
Publication of CN220650833U publication Critical patent/CN220650833U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The utility model discloses a key detection circuit which comprises an MCU, resistors RX1 and R3, a first key circuit and a second key circuit. IO pin IO1 of MCU is connected with resistor R3 through resistance RX1 and then grounded. The first key circuit comprises a resistor R1 and a key K1, VCC is connected with one end of the key K1 after being connected with the resistor R1, and the other end of the key K1 is connected with a resistor RX1 and a resistor R3 respectively. The second key circuit comprises a resistor R2 and a key K2, wherein the resistor RX1 is connected with the resistor R2 and then connected with the key K2 to be grounded. By respectively configuring IO pins IO1 of the MCU, the MCU can respectively identify the pressing of the keys K1 and K2, and the design purpose is achieved.

Description

Key detection circuit
Technical Field
The utility model relates to the field of circuits, in particular to a key detection circuit.
Background
The existing key identification control circuit is mostly connected with keys through IO pins or AD pins of an MCU so as to realize the identification of the MCU to key signal input, but in the actual use, some electric appliances are designed and improved in the process, and then the design of B is selected after A is selected, for example, the working time is selected after the working strength is selected. If the detection of two selected keys can be realized through a single IO pin or AD pin, the use of the IO pin and the AD pin can be reduced, and in addition, the processing speed of the MCU can be improved.
Disclosure of Invention
The utility model mainly aims to provide a key detection circuit which can realize detection of two selected keys through a single IO pin or AD pin, so that the use of the IO pin and the AD pin can be reduced, and in addition, the processing speed of an MCU (micro control unit) can be improved.
The utility model provides a key detection circuit which comprises an MCU, resistors RX1 and R3, a first key circuit and a second key circuit;
IO pin IO1 of the MCU is connected with resistor R3 through resistor RX1 and then grounded;
the first key circuit comprises a resistor R1 and a key K1, VCC is connected with the resistor R1 and then connected with one end of the key K1, and the other end of the key K1 is respectively connected with a resistor RX1 and a resistor R3;
the second key circuit comprises a resistor R2 and a key K2, wherein the resistor RX1 is connected with the resistor R2 and then connected with the key K2 to be grounded;
by configuring the IO pins IO1 of the MCU, the MCU can respectively identify the pressing of the keys K1 and K2, and the design purpose is achieved.
Preferably, the resistance of the resistor R3 is much larger than the resistances of the resistors R1 and R2.
The key detection circuit has the beneficial effects that:
1. in the key use of the first A and then B of some specific circuits, the key detection circuit can reduce the use of IO pins and AD pins, and in addition, the MCU processing speed can be improved.
2. Through the key detection circuit of this patent, the use of IO pin and AD pin can be reduced to can reduce the level of using MCU in the in-service use, thereby can reduce use cost.
Drawings
FIG. 1 is a circuit diagram of a key detection circuit of the present utility model;
the achievement of the objects, functional features and advantages of the present utility model will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the utility model.
Referring to fig. 1, an embodiment of a key detection circuit of the present utility model is presented:
a key detection circuit comprises an MCU, resistors RX1 and R3, a first key circuit and a second key circuit;
IO pin IO1 of MCU is connected with resistor R3 through resistance RX1 and then grounded. The first key circuit comprises a resistor R1 and a key K1, VCC is connected with one end of the key K1 after being connected with the resistor R1, and the other end of the key K1 is connected with a resistor RX1 and a resistor R3 respectively. The second key circuit comprises a resistor R2 and a key K2, wherein the resistor RX1 is connected with the resistor R2 and then connected with the key K2 to be grounded.
In this embodiment, the resistance of the resistor R1 is 3kΩ, the resistance of the resistor R2 is 20kΩ, the resistance of the resistor R3 is 390kΩ, and the resistance of the resistor RX1 is 100 Ω.
When the device is used, the IO pin IO1 of the MCU is firstly configured to be high-resistance input, the level of the IO pin IO1 of the MCU is detected, the key K1 is low when not pressed, and the level of the IO pin IO1 of the MCU is high after the key K1 is pressed, so that the detection of the key K2 is realized. Since the resistance value of the resistor R2 is relatively low, the level of the IO pin IO1 of the MCU will not be affected whenever the key K2 is pressed.
After the key K1 is confirmed to be pressed, the IO pin IO1 of the MCU is configured to be provided with pull-up input, the level of the IO pin IO1 of the MCU is detected, the level is high when the key K2 is not pressed, and after the key K2 is pressed, the level of the IO pin IO1 of the MCU is low due to the fact that the resistor R2 and the resistor R3 are matched with voltage division, so that the detection of the key K2 is achieved.
The foregoing description is only of the preferred embodiments of the present utility model and is not intended to limit the scope of the utility model, and all equivalent structural changes made by the present utility model and the accompanying drawings, or direct or indirect application in other related technical fields, are included in the scope of the present utility model.

Claims (2)

1. A key detection circuit is characterized in that,
the circuit comprises an MCU, resistors RX1 and R3, a first key circuit and a second key circuit;
IO pin IO1 of the MCU is connected with resistor R3 through resistor RX1 and then grounded;
the first key circuit comprises a resistor R1 and a key K1, VCC is connected with the resistor R1 and then connected with one end of the key K1, and the other end of the key K1 is respectively connected with a resistor RX1 and a resistor R3;
the second key circuit comprises a resistor R2 and a key K2, wherein a resistor RX1 is connected with the resistor R2 and then connected with the key K2 to be grounded;
by configuring the IO pins IO1 of the MCU, the MCU can respectively identify the pressing of the key K1 and the key K2, and the design purpose is achieved.
2. The key detection circuit according to claim 1, wherein the resistance R3 is substantially larger than the resistances of the resistor R1 and the resistor R2.
CN202322273304.2U 2023-08-23 2023-08-23 Key detection circuit Active CN220650833U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202322273304.2U CN220650833U (en) 2023-08-23 2023-08-23 Key detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202322273304.2U CN220650833U (en) 2023-08-23 2023-08-23 Key detection circuit

Publications (1)

Publication Number Publication Date
CN220650833U true CN220650833U (en) 2024-03-22

Family

ID=90290843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202322273304.2U Active CN220650833U (en) 2023-08-23 2023-08-23 Key detection circuit

Country Status (1)

Country Link
CN (1) CN220650833U (en)

Similar Documents

Publication Publication Date Title
CN101089837B (en) Apparatus and method for discerning a host interface
CN106556752A (en) GPIO interface circuit for detecting
US8745297B2 (en) Load card for testing peripheral component interconnect slots
CN215493959U (en) Testing device compatible with ESIM card and entity SIM card
CN220650833U (en) Key detection circuit
CN102809722A (en) Wake-up signal test system and test card thereof
CN216957463U (en) Voltage bias power supply circuit and solid state disk testing device
CN103546138B (en) Touch key-press control circuit
CN203858599U (en) Passive stylus
CN102857231B (en) A kind of key press detecting circuit
US20130275632A1 (en) Key detection circuit
CN206863542U (en) Key press detecting circuit
CN108173544A (en) A kind of compatible input or the I/O port circuit of output control
CN204680008U (en) A kind of spi bus expanded circuit with ID recognition function
CN109813964B (en) Capacitance detection circuit and method
CN103135051A (en) Test fixture for power source restarting
CN105227188B (en) A kind of more key press detecting circuits
CN104459327A (en) Detection circuit and method for detonator explosive head resistor
CN206532281U (en) Can a key enter reforestation practices E-book reader
CN107395165A (en) A kind of liquid level gauge echo time collection peak detection circuit
CN204287325U (en) A kind of test circuit of Detonator head resistance
CN210324106U (en) Keyboard circuit and keyboard
CN105425861B (en) A kind of temperature-control circuit
CN109101376A (en) A kind of USB speed measuring device and system
CN211317368U (en) Sensor detection circuit and electronic equipment

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant