CN208623648U - A kind of matrix press-key detection circuit - Google Patents
A kind of matrix press-key detection circuit Download PDFInfo
- Publication number
- CN208623648U CN208623648U CN201821194571.3U CN201821194571U CN208623648U CN 208623648 U CN208623648 U CN 208623648U CN 201821194571 U CN201821194571 U CN 201821194571U CN 208623648 U CN208623648 U CN 208623648U
- Authority
- CN
- China
- Prior art keywords
- circuit
- diode
- resistance
- matrix
- trigger signal
- 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
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
The utility model provides a kind of matrix press-key detection circuit, it include: trigger signal circuit and matrix keyboard circuit, the matrix keyboard circuit includes matrix keyboard and shift register, the trigger signal circuit and shift register are connected with the matrix keyboard respectively, and the trigger signal circuit and shift register are respectively connected to external control circuit.The circuit structure that the utility model passes through improvement matrix press-key detection circuit, increase trigger signal circuit, and then it can be when having by key pressing, actively request signal is pressed to external control circuit sending, external control circuit is connected to after request signal, reading is scanned to matrix keyboard again, and then the waste of unnecessary CPU scan resource can be avoided by hardware mode, improves working efficiency.
Description
Technical field
The utility model relates to a kind of matrix press-key circuit more particularly to a kind of matrix press-key detection circuits.
Background technique
It, generally can be by the way of matrix press-key in the occasion for needing to use key and comparing.Matrix press-key, which has, uses CPU
Pin it is few and input number of keys more than advantage.It is using continually scanning in the reading manner of conventional use of matrix press-key
Mode ranks key value is read out, there is the drawbacks of additional consumption cpu resource in the mode of this existing scanning.
Summary of the invention
Technical problem to be solved in the utility model be need to provide a kind of matrix that can reduce CPU scan resource by
Key detection circuit.
In this regard, the utility model provides a kind of matrix press-key detection circuit, comprising: trigger signal circuit and matrix keyboard electricity
Road, the matrix keyboard circuit include matrix keyboard and shift register, and the trigger signal circuit and shift register are distinguished
It is connected with the matrix keyboard, the trigger signal circuit and shift register are respectively connected to external control circuit.
Further improvement of the utility model is that the trigger signal circuit includes resistance R458, diode D47, two
Pole pipe D46 and diode D45, one end of the resistance R458 are connected to external control circuit, and the resistance R458's is another
End is respectively connected to the anode of the anode of the diode D47, the anode of diode D46 and diode D45, the diode
The cathode of the cathode of D47, the cathode of diode D46 and diode D45 is respectively connected to the matrix keyboard.
Further improvement of the utility model is that the trigger signal circuit further includes resistance R459, the resistance
One end of R459 is connected to potential end, and the other end of the resistance R459 is respectively connected to the anode of the diode D47, two
The anode of pole pipe D46 and the anode of diode D45.
Further improvement of the utility model is that the upper potential end is connected to the DC power supply of 3.3V.
Further improvement of the utility model is that the control circuit of the outside includes CPU main control module, the triggering
Signal circuit and shift register are connected with the CPU main control module respectively.
Further improvement of the utility model is that the control circuit of the outside further includes speaker circuit, described to raise
Sound device circuit includes resistance R417, resistance R113, triode Q1 and buzzer U5, and one end of the resistance R417 is connected to described
The other end of the loudspeaker enable pin of CPU main control module, the resistance R417 is respectively connected to one end and three of resistance R113
The base stage of pole pipe Q1, the other end of the resistance R113 and the emitter ground connection of triode Q1, the collector of the triode Q1
It is connected to a pin of the buzzer U5, another pin of the buzzer U5 is connected to power end.
Further improvement of the utility model is, the control circuit of the outside further include 3.3V direct current supply module and
Battery power supply module, the 3.3V direct current supply module and battery power supply module are respectively connected to the electricity of the CPU main control module
Source power pin and battery tube foot.
Compared with prior art, the utility model has the beneficial effects that: the electricity for passing through improvement matrix press-key detection circuit
Line structure increases trigger signal circuit, and then can be when having by key pressing, actively (such as to external control circuit
CPU it) issuing and presses request signal, external control circuit is connected to request signal and then is scanned reading to matrix keyboard,
And then the waste of unnecessary CPU scan resource can be avoided by hardware mode, it improves work efficiency.
Detailed description of the invention
Fig. 1 is a kind of modular structure schematic diagram of embodiment of the utility model;
Fig. 2 is a kind of operation principle schematic diagram of embodiment of the utility model;
Fig. 3 is a kind of circuit diagram of the matrix keyboard of embodiment of the utility model;
Fig. 4 is a kind of circuit diagram of the control circuit of embodiment of the utility model.
Specific embodiment
With reference to the accompanying drawing, the preferably embodiment of the utility model is described in further detail.
As depicted in figs. 1 and 2, this example provides a kind of matrix press-key detection circuit, comprising: trigger signal circuit 1 and matrix
Keyboard circuit 2, the matrix keyboard circuit 2 include matrix keyboard 201 and shift register 202,1 He of trigger signal circuit
Shift register 202 is connected with the matrix keyboard 201 respectively, and the trigger signal circuit 1 and shift register 202 are distinguished
It is connected to external control circuit 3.
As shown in Fig. 2, trigger signal circuit 1 described in this example includes resistance R458, diode D47, diode D46 and two poles
Pipe D45, one end of the resistance R458 are connected to external control circuit 3, and the other end of the resistance R458 is respectively connected to
The anode of the anode of the diode D47, the anode of diode D46 and diode D45, the cathode of the diode D47, two poles
The cathode of pipe D46 and the cathode of diode D45 are respectively connected to the matrix keyboard 201.Preferably, trigger signal described in this example
Circuit 1 further includes resistance R459, and one end of the resistance R459 is connected to potential end, the other end difference of the resistance R459
It is connected to the anode of the anode of the diode D47, the anode of diode D46 and diode D45.The upper potential end is connected to
The DC power supply of 3.3V.
As shown in Fig. 3 the circuit design principle schematic diagram of the matrix keyboard 201 of this example, the circle of black refer to by
Key, once pressing key pressing, horizontal and vertical intersection point will be connected;Horizontal and vertical black line is conducting wire.Do not pressing
When key pressing, S-KEY1#, S-KEY2# and S-KEY3# can be in high level because 5V is pulled up, and trigger signal is also place
In high level.CPU can allow EXL-KEY1#, EXL-KEY2#, EXL-KEY3# and EXL-KEY4# to be in 0V.Once S-KEY1#, S-
Any one key is pressed on KEY2# and S-KEY3#, then trigger signal will be pulled low, is in low level.CPU is once
When receiving trigger signal becomes low level from high level, just triggers key scan program and matrix press-key is scanned.
CPU is the main control chip U40 in CPU main control module.
Compared with conventional matrix press-key, this example increases the passback of trigger signal by the trigger signal circuit 1.
As shown in Fig. 2, the resistance R459 of trigger signal circuit 1 described in this example is to play metering function, direct-connected electric current is prevented
It is excessive, there is big sink current to be introduced into the main control chip U40 in the CPU main control module.Diode D47, diode D46 and two poles
The anode of pipe D45 can access 3.3V, and cathode can access 5V, the effect of these diodes is when not pressing key pressing
Electric current one-way conduction is played, prevents the electric current of the one end 5V from flowing backward to the side 3.3V.
When key is pressed, diode cathode side can be pulled to 0V, so that there are voltages for diode positive and negative anodes
Difference, diode are connected, and the pressure difference of diode two sides can become diode turn-on voltage.At this point, being connected to external control
The end P5_10-KEY-INT of circuit 3 will detect low level, so that trigger signal comes into force.
As shown in Fig. 2, in matrix keyboard circuit 2 described in this example, after trigger signal disappearance, it is meant that key is loose
It opens, at this point, CPU does not need scan matrix key again.CPU can allow S-KEY1#, S- when no scan matrix key
KEY2#, S-KEY3# and S-KEY4# are in high level, allow at EXL-KEY1#, EXL-KEY2#, EXL-KEY3# and EXL-KEY4#
In low level.As long as there is any one key (because this example preferably only uses 12 keys, it is preferred, therefore, that just for S-
KEY1#, S-KEY2# and S-KEY3# are handled) it is pressed, trigger signal will be triggered.Trigger signal is once triggered,
CPU just will start scanner program.
In the course of work of scanning, one, allow S-KEY1#, S-KEY2#, S-KEY3#, S-KEY4#, EXL-KEY1#,
EXL-KEY2#, EXL-KEY3# and EXL-KEY4# are completely in high level;Two, every time only allow EXL-KEY1#, EXL-KEY2#,
One in EXL-KEY3# and EXL-KEY4# becomes low level, when checking which line becomes low level, trigger signal
It can detect effectively, recording the signal is ROW;Three, S-KEY1#, S-KEY2#, S-KEY3#, S-KEY4#, EXL- are allowed
KEY1#, EXL-KEY2#, EXL-KEY3# and EXL-KEY4# are completely in high level;Four, each S-KEY1#, S-KEY2# of only allowing
Become low level with one in S-KEY3#, when checking which line becomes low level, trigger signal can have been detected
Effect, recording the signal is COLUMN;Five, the value of ROW, COLUMN have just uniquely determined the position of key in a matrix.
As shown in figure 4, control circuit 3 external described in this example includes CPU main control module, CPU main control module includes master control
Chip U40 and its peripheral circuit, the trigger signal circuit 1 and shift register 202 are connected with the CPU main control module respectively
It connects.
Preferably, control circuit 3 external described in this example further includes speaker circuit 301, and the speaker circuit 301 wraps
It includes resistance R417, resistance R113, triode Q1 and buzzer U5, one end of the resistance R417 and is connected to the CPU master control mould
The loudspeaker enable pin of block, the other end of the resistance R417 are respectively connected to one end of resistance R113 and the base of triode Q1
Pole, the other end of the resistance R113 and the emitter ground connection of triode Q1, the collector of the triode Q1 is connected to described
A pin of buzzer U5, another pin of the buzzer U5 are connected to power end.For realizing loudspeaker function.
Preferably, control circuit 3 external described in this example further includes 3.3V direct current supply module 302 and battery power supply module
303, the power supply that the 3.3V direct current supply module 302 and battery power supply module 303 are respectively connected to the CPU main control module supplies
Fulgurite foot and battery tube foot, and then being capable of compatible direct current power supply and battery power supply.
In conclusion circuit structure of this example by improvement matrix press-key detection circuit, increases trigger signal circuit 1, into
And can actively be issued to external control circuit 3(such as CPU) when having by key pressing and press request signal, it is external
Control circuit 3 is connected to request signal and then is scanned reading to matrix keyboard 201, and then can be kept away by hardware mode
The waste for exempting from unnecessary CPU scan resource, improves work efficiency.
The specific embodiment of the above is the better embodiment of the utility model, and it is practical new not to limit this with this
The specific implementation range of type, the scope of the utility model includes being not limited to present embodiment, all according to the utility model
Shape, structure made by equivalence changes it is within the protection scope of the present utility model.
Claims (7)
1. a kind of matrix press-key detection circuit characterized by comprising trigger signal circuit and matrix keyboard circuit, the square
Battle array keyboard circuit includes matrix keyboard and shift register, the trigger signal circuit and shift register respectively with the matrix
Keyboard is connected, and the trigger signal circuit and shift register are respectively connected to external control circuit.
2. matrix press-key detection circuit according to claim 1, which is characterized in that the trigger signal circuit includes resistance
R458, diode D47, diode D46 and diode D45, one end of the resistance R458 are connected to external control circuit, institute
The other end for stating resistance R458 is respectively connected to the anode of the diode D47, the anode of diode D46 and diode D45
Anode, the cathode of the cathode of the diode D47, the cathode of diode D46 and diode D45 are respectively connected to the matrix key
Disk.
3. matrix press-key detection circuit according to claim 2, which is characterized in that the trigger signal circuit further includes electricity
R459 is hindered, one end of the resistance R459 is connected to potential end, and the other end of the resistance R459 is respectively connected to described two
The anode of the anode of pole pipe D47, the anode of diode D46 and diode D45.
4. matrix press-key detection circuit according to claim 3, which is characterized in that the upper potential end is connected to 3.3V's
DC power supply.
5. matrix press-key detection circuit according to any one of claims 1 to 4, which is characterized in that the control of the outside
Circuit processed includes CPU main control module, and the trigger signal circuit and shift register are connected with the CPU main control module respectively
It connects.
6. matrix press-key detection circuit according to claim 5, which is characterized in that the control circuit of the outside further includes
Speaker circuit, the speaker circuit include resistance R417, resistance R113, triode Q1 and buzzer U5, the resistance
One end of R417 is connected to the loudspeaker enable pin of the CPU main control module, and the other end of the resistance R417 is separately connected
To one end of resistance R113 and the base stage of triode Q1, the other end of the resistance R113 and the emitter ground connection of triode Q1,
The collector of the triode Q1 is connected to a pin of the buzzer U5, another pin connection of the buzzer U5
To power end.
7. matrix press-key detection circuit according to claim 5, which is characterized in that the control circuit of the outside further includes
3.3V direct current supply module and battery power supply module, the 3.3V direct current supply module and battery power supply module are respectively connected to institute
State the power supply power supply pin and battery tube foot of CPU main control module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201821194571.3U CN208623648U (en) | 2018-07-26 | 2018-07-26 | A kind of matrix press-key detection circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201821194571.3U CN208623648U (en) | 2018-07-26 | 2018-07-26 | A kind of matrix press-key detection circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN208623648U true CN208623648U (en) | 2019-03-19 |
Family
ID=65707466
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201821194571.3U Active CN208623648U (en) | 2018-07-26 | 2018-07-26 | A kind of matrix press-key detection circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN208623648U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112290930A (en) * | 2020-10-22 | 2021-01-29 | 珠海格力电器股份有限公司 | Key detection circuit and household appliance |
-
2018
- 2018-07-26 CN CN201821194571.3U patent/CN208623648U/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112290930A (en) * | 2020-10-22 | 2021-01-29 | 珠海格力电器股份有限公司 | Key detection circuit and household appliance |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN201256290Y (en) | Protection circuit for suppressing surge current and preventing input voltage reverse connection | |
CN101351007B (en) | Method and apparatus for implementing one-key type computer opening/closing | |
CN208623648U (en) | A kind of matrix press-key detection circuit | |
CN207398814U (en) | Undervoltage overvoltage protection circuit and power supply system | |
CN105867212A (en) | Wake-up circuit for converting low-level signal to high-level signal | |
CN109814751A (en) | Touch control display device and the method for obtaining touch signal | |
CN201210722Y (en) | System auxiliary reset circuit | |
KR840003892A (en) | Semiconductor Memory with Dynamic Discharge Circuit | |
CN201583940U (en) | Device for indicating running state of network and network terminal | |
CN204103881U (en) | A kind of circuit realizing mains switch based on matrix press-key | |
CN213279618U (en) | On-off device of capacitive touch key | |
CN206370027U (en) | Electric boot-strap circuit on a kind of simple and practical pure hardware | |
CN216531282U (en) | Driving and scanning circuit and electronic equipment | |
CN102522976A (en) | Key expansion circuit, expansion method and mobile terminal | |
CN208923304U (en) | Battery management system based on metal-oxide-semiconductor | |
CN208721230U (en) | A kind of soft switch circuit applied on electronic scale | |
CN210514981U (en) | Switching circuit for subway equipment | |
CN103164008A (en) | Complementary metal oxide semiconductor (CMOS) password eliminating circuit | |
CN207968448U (en) | A kind of switch and reset circuit of power supply | |
CN201467324U (en) | Low power consumption CPU standby commutation circuit | |
CN208707337U (en) | A kind of mobile power source circuit for cooperating with Lightning plug | |
CN201153295Y (en) | Television standby detection power supply circuit | |
CN207835430U (en) | A kind of totem-pote circuit | |
CN207053651U (en) | A kind of circuit and television set for reducing television standby power consumption | |
CN201289453Y (en) | Soft closedown circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |