CN206863547U - A kind of button scan round circuit - Google Patents
A kind of button scan round circuit Download PDFInfo
- Publication number
- CN206863547U CN206863547U CN201720813012.5U CN201720813012U CN206863547U CN 206863547 U CN206863547 U CN 206863547U CN 201720813012 U CN201720813012 U CN 201720813012U CN 206863547 U CN206863547 U CN 206863547U
- Authority
- CN
- China
- Prior art keywords
- button
- mcu
- input
- output terminal
- diode
- 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
Links
Abstract
The utility model discloses a kind of button scan round circuit, including 12 buttons, it is characterized in that, also include a MCU chip and four diodes, the MCU chip includes the first input/output terminal (IO1), the second input/output terminal (IO2), the 3rd input/output terminal (IO3) and the 4th I/O interface.The utility model avoids false triggering by the way of progressive scan, using minimum MCU ports, most buttons is designed, so as to increase the utilization rate of MCU ports, the loss of MCU general purpose I/O ports is reduced, while avoids additionally adding hardware cost increase caused by dedicated button scanning chip.
Description
Technical field
It the utility model is related to a kind of electronic circuit, more particularly to a kind of button scan round circuit.
Background technology
Conventional keys design, and mostly matrix keyboard designs, or realize the detection of button by the way of detection using interrupting,
Both modes are practical in the case where number of keys is less, but when button is more, the disadvantage of both modes
End clearly, can take many MCU port.If MCU does not have unnecessary port, just can only with extra extended chip from
And increase cost, therefore just need a kind of port that can take as little as possible to realize the maximum method by bond number.
Utility model content
A kind of the defects of the technical problems to be solved in the utility model is to overcome in the prior art, there is provided button circulation
Scanning circuit, determines whether button is pressed by the way of progressive scan, using minimum MCU ports, designs most
Button, so as to increase the utilization rate of MCU ports, the loss of MCU general purpose I/O ports is reduced, while avoid additionally adding dedicated button
Scan hardware cost increase caused by chip.
The utility model is that solve above-mentioned technical problem by following technical proposals:
A kind of button scan round circuit of the utility model, the button scan round circuit include 12 buttons, its
Feature is that the button scan round circuit also includes a MCU chip and four diodes, and the MCU chip includes first
Input/output terminal IO1, the second input/output terminal IO2, the 3rd input/output terminal IO3 and the 4th I/O interface, wherein:
The first input/output terminal IO1 of the MCU in parallel one end with the first button K1, the second button K2 one end,
3rd button K3 one end connects with the first diode D1 positive pole;
The second input/output terminal IO2 of the MCU in parallel one end with the 4th button K4, the 5th button K5 one end,
6th button K6 one end connects with the second diode D2 positive pole;
The 3rd input/output terminal IO3 of the MCU in parallel one end with the 7th button K7, the 8th button K8 one end,
9th button K9 one end connects with the 3rd diode D3 positive pole;
The 4th input/output terminal IO4 of the MCU one end with the tenth button K10, the one of the 11st button K11 in parallel
End, the 12nd button K12 one end connect with the 4th diode D4 positive pole;
The negative pole of the first diode D1 in parallel the other end with the 6th button K6, the 8th button K8 the other end and
Tenth button K10 other end connection, the negative pole of the second diode D2 other end with the first button K1, the 9th in parallel
The button K9 other end and the 11st button the K11 other end connect, and the negative pole of the 3rd diode D3 is in parallel with the
The other end connection of the two button K2 other end, the 4th button K4 other end and the 12nd button K12, the 4th diode
D4 negative pole in parallel the other end with the 3rd button K3, the 5th button K5 other end and the 7th button K7 the other end connect
Connect.
Preferably, 20~1000 cycle times of button scan round circuit scanning per second.
Positive effect of the present utility model is:
The utility model avoids false triggering by the way of progressive scan, using minimum MCU ports, designs at most
Button, so as to increase the utilization rate of MCU ports, reduce the loss of MCU general purpose I/O ports, at the same avoid additionally adding it is special by
Hardware cost increase caused by key scanning chip;Schottky diode is additionally used, utilizes its conventional one-way conduction ability
, forward voltage drop low the characteristics of high with its switching frequency, it ensure that the normal operation of key circuit.
Brief description of the drawings
Fig. 1 is the structural representation of preferred embodiment of the present utility model.
Embodiment
The utility model is further illustrated below by the mode of embodiment, but is not therefore limited in the utility model
Among described scope of embodiments.
Refer to Fig. 1, a kind of button scan round circuit of the utility model, including 12 buttons, in addition to a MCU core
Piece and four diodes, MCU chip include the first input/output terminal IO1, the second input/output terminal IO2, the 3rd input/output terminal
IO3 and the 4th I/O interface, wherein:
MCU the first input/output terminal IO1 one end with the first button K1, the second button K2 one end, the 3rd in parallel
Button K3 one end connects with the first diode D1 positive pole;
MCU the second input/output terminal IO2 one end with the 4th button K4, the 5th button K5 one end, the 6th in parallel
Button K6 one end connects with the second diode D2 positive pole;
MCU the 3rd input/output terminal IO3 one end with the 7th button K7, the 8th button K8 one end, the 9th in parallel
Button K9 one end connects with the 3rd diode D3 positive pole;
MCU the 4th input/output terminal IO4 in parallel one end with the tenth button K10, the 11st button K11 one end,
12nd button K12 one end connects with the 4th diode D4 positive pole;
First diode D1 the negative pole other end with the 6th button K6, the 8th button the K8 in parallel other end and the tenth
Button K10 other end connection, the second diode D2 the negative pole other end with the first button K1, the 9th button K9 in parallel
The other end and the 11st button the K11 other end connect, and the 3rd diode D3 negative pole is another with the second button K2 in parallel
The other end connection of one end, the 4th button K4 other end and the 12nd button K12, the 4th diode D4 negative pole in parallel with
The other end connection of the 3rd button K3 other end, the 5th button K5 other end and the 7th button K7.
The utility model port basis by the way of scan round scans button, 20~1000 cycles time of scanning per second
Number, more keypress function is realized by less port.MCU judges which button is pressed, then according to different buttons,
Different effects is played, determines whether that button is pressed by the way of uninterrupted scan round line by line, and which is
Button is pressed.The first input/output terminal of software design patterns IO1 first is arranged to low level 0 and the second input/output terminal IO2, the 3rd defeated
When entering output end IO3 and the 4th input/output terminal IO4 and being arranged to high level 1, when energization work, now scan button first and press
Key K1, the second button K2 and the 3rd button K3 are so as to judging whether that a button is pressed and judge which button is pressed.When
When one is pressed in one button K1, the second button K2 and the 3rd button K3, the second input/output terminal IO2, the 3rd input and output
There is a port level to be changed into low level 0 in the IO3 and the 4th input/output terminal IO4 of end, corresponding first inputs of the first button K1 are defeated
Go out and hold IO2, the second button K2 corresponding 4th input/output terminal IO4 of corresponding 3rd input/output terminal IO3, the 3rd button K3, because
Due to the one-way conduction of diode when 6th button K6 is pressed, IO2 level will not step-down, so as to prevent K6 buttons and K1 by
Keypad is not unclear.
Similarly, then the second input/output terminal IO2 is set for the 0 and first input/output terminal IO1, the 3rd input/output terminal IO3
1 is arranged to the 4th input/output terminal IO4, now the 4th button K4, the 5th button K5 and the 6th button K6 are scanned whether pressing
Under, the like ... whole scanning process terminates, and scanning restarts.
Due to MCU scannings button quickly, it is per second can be even thousands of times with scan round tens hundreds of times, can stablize fast
Which button the judgement of speed presses!
The utility model judges that button is pressed by the way of progressive scan, using minimum MCU ports, designs most
More buttons, so as to increase the utilization rate of MCU ports, the loss of MCU general purpose I/O ports is reduced, while avoid additionally adding special
Hardware cost increase caused by key scan chip;Schottky diode is additionally used, utilizes its conventional one-way conduction energy
The characteristics of power is high with its switching frequency, forward voltage drop is low, ensure that the normal operation of key circuit.
The utility model is described in detail above in association with accompanying drawing embodiment, those skilled in the art can root
Many variations example is made to the utility model according to described above.All timess within the spirit and principles of the utility model, made
What modification, equivalent substitution, improvement etc., should be included within the scope of protection of the utility model.Thus, it is some in embodiment
Details should not be formed will be used as this reality to restriction of the present utility model, the utility model using the scope that appended claims define
With new protection domain.
Claims (2)
1. a kind of button scan round circuit, the button scan round circuit includes 12 buttons, it is characterised in that described
Button scan round circuit also includes a MCU chip and four diodes, and the MCU chip includes the first input/output terminal
(IO1), the second input/output terminal (IO2), the 3rd input/output terminal (IO3) and the 4th I/O interface, wherein:
The first input/output terminal (IO1) of the MCU one end with the first button (K1), the one of the second button (K2) in parallel
End, one end of the 3rd button (K3) connect with the positive pole of the first diode (D1);
The second input/output terminal (IO2) of the MCU one end with the 4th button (K4), the one of the 5th button (K5) in parallel
End, one end of the 6th button (K6) connect with the positive pole of the second diode (D2);
The 3rd input/output terminal (IO3) of the MCU one end with the 7th button (K7), the one of the 8th button (K8) in parallel
End, one end of the 9th button (K9) connect with the positive pole of the 3rd diode (D3);
The 4th input/output terminal (IO4) of the MCU one end with the tenth button (K10), the 11st button (K11) in parallel
One end, one end of the 12nd button (K12) connect with the positive pole of the 4th diode (D4);
The other end of the negative pole of first diode (D1) other end with the 6th button (K6), the 8th button (K8) in parallel
Connected with the other end of the tenth button (K10), the negative pole of second diode (D2) is another with the first button (K1) in parallel
The other end connection of one end, the other end of the 9th button (K9) and the 11st button (K11), the 3rd diode (D3) are born
The other end of the pole other end with the second button (K2), the other end of the 4th button (K4) and the 12nd button (K12) in parallel
Connection, the negative pole of the 4th diode (D4) in parallel the other end with the 3rd button (K3), the 5th button (K5) it is another
End connects with the other end of the 7th button (K7).
2. button scan round circuit according to claim 1, it is characterised in that the button scan round circuit is per second
Scan 20~1000 cycle times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201720813012.5U CN206863547U (en) | 2017-07-06 | 2017-07-06 | A kind of button scan round circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201720813012.5U CN206863547U (en) | 2017-07-06 | 2017-07-06 | A kind of button scan round circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN206863547U true CN206863547U (en) | 2018-01-09 |
Family
ID=60832294
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201720813012.5U Active CN206863547U (en) | 2017-07-06 | 2017-07-06 | A kind of button scan round circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN206863547U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110308707A (en) * | 2019-07-04 | 2019-10-08 | 无锡琼智信息科技有限公司 | Controller, intelligentized Furniture and key control method |
-
2017
- 2017-07-06 CN CN201720813012.5U patent/CN206863547U/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110308707A (en) * | 2019-07-04 | 2019-10-08 | 无锡琼智信息科技有限公司 | Controller, intelligentized Furniture and key control method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105487707B (en) | A kind of intelligent wearable device and its data inputting method | |
CN110020518A (en) | A kind of terminal control method based on fingerprint recognition key, device and terminal | |
CN1912819A (en) | Touch input recognition method for terminal provided with touch screen and terminal thereof | |
CN102609072B (en) | The method that response button triggers and the portable set that adopts the method | |
CN103857019A (en) | Power-saving method in mobile terminal | |
CN206863547U (en) | A kind of button scan round circuit | |
CN104980986A (en) | Optimal communication network standard selection method and mobile terminal | |
US8311575B2 (en) | Handheld mobile phone and method for resetting the handheld mobile phone thereof | |
CN104572075B (en) | Intelligent terminal information display method and intelligent terminal | |
CN202364197U (en) | Button detection and LED control circuit | |
CN104270160A (en) | Key detecting device and method | |
CN101655989A (en) | 3D special-efficacy graphic user interface system and method of mobile phone | |
CN104124978A (en) | Novel multi-functional key detection method based on state machine | |
CN202424694U (en) | Keyboard scanning circuit saving input/output (I/O) ports | |
CN101656782A (en) | Planar special-effect graph user interface system of mobile phone and method | |
US8989801B2 (en) | Mobile phone and key detection device | |
CN201946316U (en) | Single-chip microcontroller (SCM) control-based queuing system for public washing machine | |
CN202472565U (en) | Keyboard circuit, keyboard and input device | |
CN201657039U (en) | Mobile phone capable of being externally connected with USB interface equipment | |
CN201286127Y (en) | 3D special effect user interface system for mobile phone | |
TW202044004A (en) | Low-power-consumption touch display device including a connection circuit, a self-capacitance sensing circuit, a mode determination unit and a control unit | |
CN1030943C (en) | Detection method for GHOST of keyboard single chip microcomputer and arrangement method of special function key | |
CN215729397U (en) | Control circuit | |
CN101977062B (en) | Key expansion method and key device | |
CN204795127U (en) | 51 monolithic model cell -phones to old person |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |