CN203457140U - A circuit structure using a single IO port to expand a plurality of buttons - Google Patents
A circuit structure using a single IO port to expand a plurality of buttons Download PDFInfo
- Publication number
- CN203457140U CN203457140U CN201320462138.4U CN201320462138U CN203457140U CN 203457140 U CN203457140 U CN 203457140U CN 201320462138 U CN201320462138 U CN 201320462138U CN 203457140 U CN203457140 U CN 203457140U
- Authority
- CN
- China
- Prior art keywords
- button
- resistance
- mouth
- resistor
- buttons
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
The utility model discloses a circuit structure using a single IO port to expand a plurality of buttons; the circuit comprises a first resistor, a second resistor, a first capacitor, a first button and a second button; an end of the second resistor is connected with an IO port of an external micro-control unit, and the other end of the second resistor is connected with one end of the first capacitor; a common connecting end is respectively connected with one end of the first resistor and one end of the second button; the other end of the first capacitor and the other end of the second button are grounded; the other end of the first resistor is connected with one end of the first button, and the other end of the first button is connected with power voltage; the advantages are that the circuit only comprises the first resistor, the second resistor, the first capacitor, the first button and the second button, so the circuit is simple in structure, and only needs one IO port to realize input of two button signals, is convenient in control, uses less IO ports, improves utilization rate of the IO port, saves resources of the micro-control unit, is fast in responding time, and the IO port needs no extra function.
Description
Technical field
The utility model relates to a kind of technology with IO mouth expansion button, especially relates to the circuit structure that the single IO mouth of a kind of use is expanded a plurality of buttons.
Background technology
Micro-control unit (MCU), owing to having the advantages such as high-performance, high code density, chip area, has therefore obtained application more and more widely in the fields such as consumer electronics product, intelligent appliance, instrument and Industry Control.For some man-machine interactions embedded system frequently, keyboard is as a kind of man-machine interaction approach generally using, because it is directly perceived, simply have irreplaceable effect, therefore in micro-control unit design process, conventionally using the GPIO(universal input/output of chip) mouth carries out button expansion.Yet, in order effectively to save the resource of chip, should with minimum IO mouth, expand more button as far as possible.
At present, the method for common IO mouth expansion button mainly contains: stand alone type, matrix form, AD(modulus) sampling type etc. is several, but all there is the inherent shortcoming that is difficult to overcome in this several method.Such as: stand alone type, an IO mouth can only be expanded a button, if want to expand a plurality of buttons, needs a plurality of IO mouths; Matrix form, a plurality of IO mouths are expanded a plurality of buttons, take IO and make a slip of the tongue many; AD sampling type, although an IO mouth can be expanded a plurality of buttons, requires IO mouth to possess AD translation function.
Summary of the invention
Technical problem to be solved in the utility model is to provide a kind of simple in structure, and only need use single IO mouth just can expand the circuit structure of realizing two and two above buttons.
The utility model solves the problems of the technologies described above adopted technical scheme: the single IO mouth of a kind of use is expanded the circuit structure of a plurality of buttons, it is characterized in that comprising the first resistance, the second resistance, the first electric capacity, the first button and the second button, one end of the second described resistance is connected with an IO mouth of outside micro-control unit, the other end of the second described resistance is connected with one end of the first described electric capacity, and its public connecting end is connected with one end of one end of described the first resistance and described the second button respectively, the equal ground connection of the other end of the other end of the first described electric capacity and the second described button, the other end of the first described resistance is connected with one end of the first described button, another termination supply voltage of the first described button.
Between the public connecting end of one end of one end of the first described resistance and the second described button and supply voltage, be arranged in parallel branched the 3rd button expansion branch road.
The 3rd described button expansion branch road comprises the 3rd resistance and the 3rd button, the public connecting end of one end of the first described resistance and one end of the second described button is connected with one end of the 3rd described resistance, the other end of the 3rd described resistance is connected with one end of the 3rd described button, another termination supply voltage of the 3rd described button.
Compared with prior art, the utility model has the advantage of:
1) this circuit structure only comprises the first resistance, the second resistance, the first electric capacity, the first button and the second button, not only circuit structure is simple, and only need to just can realize the input of two push button signallings with single IO mouth, it is convenient to control, take IO mouth few, improved the utilance of IO mouth, the resource of having saved micro-control unit, do not need IO mouth to there is extra function, fast response time.
2) this circuit structure can be by arranging branched the 3rd button expansion branch road, to realize the input of two above push button signallings, on the basis of two buttons, can also pass through the more button of hardware expanding, for chip powerful and that IO mouth is limited, there is great application and reference value like this.
Accompanying drawing explanation
Fig. 1 is the electrical block diagram of embodiment mono-;
Fig. 2 is the electrical block diagram of embodiment bis-.
Embodiment
Below in conjunction with accompanying drawing, embodiment is described in further detail the utility model.
In order to improve the utilance of the IO mouth of micro-control unit, as far as possible with existing a plurality of key circuit expansions of few IO cause for gossip, to strengthen expanded function and the purposes of the IO mouth of micro-control unit, the utility model proposes the single IO mouth of a kind of use and expand the circuit structure of a plurality of buttons, it utilizes capacitor charge and discharge principle to switch in conjunction with the input and output of IO mouth, can realize the expansion of a plurality of buttons of single IO mouth, this button extended method takes full advantage of hardware resource, has realized with single IO mouth and has expanded a plurality of buttons.
Embodiment mono-:
The single IO mouth of a kind of use that the present embodiment proposes is expanded the circuit structure of a plurality of buttons, as shown in Figure 1, it comprises the first resistance R 1, the second resistance R 2, the first capacitor C 1, the first button S1 and the second button S2, one end of the second resistance R 2 is connected with an IO mouth of outside micro-control unit MCU, the other end of the second resistance R 2 is connected with one end of the first capacitor C 1, and its public connecting end is connected with one end of the second button S2 with one end of the first resistance R 1 respectively, the equal ground connection GND of the other end of the other end of the first capacitor C 1 and the second button S2, the other end of the first resistance R 1 is connected with one end of the first button S1, another termination supply voltage VCC of the first button S1.At this, the existence of the first resistance R 1 causes short circuit while effectively having avoided the first button S1 and the second button S2 to press simultaneously, and circuit is had to protective effect.
The course of work of the circuit structure that the present embodiment proposes is:
The first step: when needs carry out recognition by pressing keys, first the IO mouth of micro-control unit MCU exports high level signal 1, now IO mouth charges by 2 pairs of the first capacitor C 1 of the second resistance R, charging interval is determined jointly by the resistance value of the second resistance R 2 and the capacitance of the first capacitor C 1, and the general charging interval is in 100 delicate left and right.
Second step: transfer input state to, time delay, and delay time is in 100 delicate left and right, micro-control unit MCU reads IO mouth state, if now the second button S2 presses, must be low level, therefore, if to read IO mouth state be low level to micro-control unit MCU, can judge that the second button S2 presses; If it is high level that micro-control unit MCU reads IO mouth state, can judge that the first button S1 presses or presses without button.
The 3rd step: the IO mouth output high level signal 1 of micro-control unit MCU, the charging interval is in 100 delicate left and right.
The 4th step: transfer again input state to, time delay, and delay time is in 100 delicate left and right, micro-control unit MCU reads IO mouth state, if now the first button S1 presses, must be high level, therefore, if to read IO mouth state be high level to micro-control unit MCU, can judge that the first button S1 presses; If it is low level that micro-control unit MCU reads IO mouth state, can judges without button and press.
Embodiment bis-:
The single IO mouth of a kind of use that the present embodiment proposes is expanded the circuit structure of a plurality of buttons, as shown in Figure 2, it comprises the first resistance R 1, the second resistance R 2, the first capacitor C 1, the first button S1 and the second button S2, one end of the second resistance R 2 is connected with an IO mouth of outside micro-control unit MCU, the other end of the second resistance R 2 is connected with one end of the first capacitor C 1, and its public connecting end is connected with one end of the second button S2 with one end of the first resistance R 1 respectively, the equal ground connection GND of the other end of the other end of the first capacitor C 1 and the second button S2, the other end of the first resistance R 1 is connected with one end of the first button S1, another termination supply voltage VCC of the first button S1.
In this specific embodiment, between the public connecting end of one end of one end of the first resistance R 1 and the second button S2 and supply voltage VCC, be arranged in parallel N and propped up the 3rd button expansion branch road, every the 3rd button expansion branch road includes the 3rd resistance and the 3rd button, as the 1st the 3rd button expansion branch road comprises the 1st the 3rd resistance R 3
1with the 1st the 3rd button S3
1, the 2nd the 3rd button expansion branch road comprises the 2nd the 3rd resistance R 3
2with the 2nd the 3rd button S3
2, N props up the 3rd button expansion branch road and comprises N the 3rd resistance R 3
nwith N the 3rd button S3
n, one end of the first resistance R 1 is connected with one end of each the 3rd resistance respectively with the public connecting end of one end of the second button S2, and the other end of each the 3rd resistance connects with one end of corresponding the 3rd button, another termination supply voltage VCC of each the 3rd button.
At this, N is more than or equal to 1 positive integer, the value of N can be set according to the actual requirements, branched the 3rd button expansion branch road can be set according to the actual requirements, but require the resistance value of N the 3rd resistance different, so just can distinguish N the 3rd button, difference discharge time by the first capacitor C 1 judges which the 3rd button is closed.
Claims (3)
1. a circuit structure of expanding a plurality of buttons with single IO mouth, it is characterized in that comprising the first resistance, the second resistance, the first electric capacity, the first button and the second button, one end of the second described resistance is connected with an IO mouth of outside micro-control unit, the other end of the second described resistance is connected with one end of the first described electric capacity, and its public connecting end is connected with one end of one end of described the first resistance and described the second button respectively, the equal ground connection of the other end of the other end of the first described electric capacity and the second described button, the other end of the first described resistance is connected with one end of the first described button, another termination supply voltage of the first described button.
2. the single IO mouth of a kind of use according to claim 1 is expanded the circuit structure of a plurality of buttons, has been arranged in parallel branched the 3rd button expansion branch road between the public connecting end of one end of one end of the first resistance described in it is characterized in that and the second described button and supply voltage.
3. the single IO mouth of a kind of use according to claim 2 is expanded the circuit structure of a plurality of buttons, it is characterized in that the 3rd described button expansion branch road comprises the 3rd resistance and the 3rd button, the public connecting end of one end of the first described resistance and one end of the second described button is connected with one end of the 3rd described resistance, the other end of the 3rd described resistance is connected with one end of the 3rd described button, another termination supply voltage of the 3rd described button.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201320462138.4U CN203457140U (en) | 2013-07-30 | 2013-07-30 | A circuit structure using a single IO port to expand a plurality of buttons |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201320462138.4U CN203457140U (en) | 2013-07-30 | 2013-07-30 | A circuit structure using a single IO port to expand a plurality of buttons |
Publications (1)
Publication Number | Publication Date |
---|---|
CN203457140U true CN203457140U (en) | 2014-02-26 |
Family
ID=50136981
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201320462138.4U Expired - Fee Related CN203457140U (en) | 2013-07-30 | 2013-07-30 | A circuit structure using a single IO port to expand a plurality of buttons |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN203457140U (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105183097A (en) * | 2015-10-27 | 2015-12-23 | 同方计算机有限公司 | Novel key system and key confirmation method |
CN107579733A (en) * | 2017-08-15 | 2018-01-12 | 北京奇虎科技有限公司 | A kind of key circuit and key device |
CN107786209A (en) * | 2016-08-31 | 2018-03-09 | 厦门雅迅网络股份有限公司 | A kind of key press detecting circuit and method |
CN109407593A (en) * | 2018-12-19 | 2019-03-01 | 浙江大学滨海产业技术研究院 | A kind of list I/O expansion system and extended method |
CN112954538A (en) * | 2021-04-02 | 2021-06-11 | 广东朝阳电子科技股份有限公司 | Series resistance type port expansion circuit sharing temperature detection port of Bluetooth headset |
-
2013
- 2013-07-30 CN CN201320462138.4U patent/CN203457140U/en not_active Expired - Fee Related
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105183097A (en) * | 2015-10-27 | 2015-12-23 | 同方计算机有限公司 | Novel key system and key confirmation method |
CN105183097B (en) * | 2015-10-27 | 2018-05-15 | 同方计算机有限公司 | A kind of confirmation method of key system input |
CN107786209A (en) * | 2016-08-31 | 2018-03-09 | 厦门雅迅网络股份有限公司 | A kind of key press detecting circuit and method |
CN107579733A (en) * | 2017-08-15 | 2018-01-12 | 北京奇虎科技有限公司 | A kind of key circuit and key device |
CN109407593A (en) * | 2018-12-19 | 2019-03-01 | 浙江大学滨海产业技术研究院 | A kind of list I/O expansion system and extended method |
CN112954538A (en) * | 2021-04-02 | 2021-06-11 | 广东朝阳电子科技股份有限公司 | Series resistance type port expansion circuit sharing temperature detection port of Bluetooth headset |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN203457140U (en) | A circuit structure using a single IO port to expand a plurality of buttons | |
CN203224819U (en) | Mainboard | |
CN203241876U (en) | Self-adaptive configuration PCIE expansion box | |
CN105513522A (en) | Shifting register, driving method thereof, drive circuit and display device | |
CN103684407A (en) | Otg device | |
CN104808852B (en) | Touch recognition and digital display set are into circuit and its external circuitses and access method | |
CN200956611Y (en) | Keyboard detecting circuit and television receiver with same | |
US20130275632A1 (en) | Key detection circuit | |
CN107027163A (en) | TypeC earphones wake up mobile phone circuit | |
CN102346556B (en) | Hybrid key module | |
CN203406859U (en) | An analog-to-digital converting button circuit | |
CN205177380U (en) | Shift register unit, touch -control display panel and touch -sensitive display device | |
CN202889317U (en) | Capacitance type touch key circuit | |
CN207304526U (en) | A kind of single I/O port detects the control circuit of three buttons | |
CN203164378U (en) | Embedded system button detection circuit | |
CN204376876U (en) | Data acquisition system | |
CN109813964B (en) | Capacitance detection circuit and method | |
CN105183097A (en) | Novel key system and key confirmation method | |
CN104836438B (en) | A kind of switch circuit devices and drive circuit | |
CN104202055B (en) | Key circuit for detecting key trigger sate in real time, gamepad and method | |
CN105227188B (en) | A kind of more key press detecting circuits | |
CN103647528B (en) | Non-overlapping clock generation circuit | |
CN202305754U (en) | Capacitance touch button detector | |
CN207410330U (en) | High-order capacitive sensor detection device | |
CN101206531B (en) | Coordinate position indicator with press keys |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140226 Termination date: 20160730 |
|
CF01 | Termination of patent right due to non-payment of annual fee |