A kind of low-cost push button signalling Acquisition Circuit
Technical field
The utility model relates to signal pickup assembly, relates in particular to a kind of low-cost push button signalling Acquisition Circuit.
Background technology
In many push button signalling Acquisition Circuit, all need the keyboard of tool input and output to realize the function of button.In the prior art, keyboard is generally the matrix keyboard structure.For example, the button of matrix keyboard is pressed the capable N row of N and is arranged, and maximum is N * N by bond number, and N+N I/O mouth arranged.
As shown in Figure 1, shown with 4 * 4 matrix keyboards to be the circuit diagram of matrix keyboard in the prior art of example among the figure.As shown in the figure, this matrix keyboard is by 16 button K1-K16, and resistance R 1-R8 forms, and it needs at least 8 I/O mouths to be connected with chip, i.e. 4 input ports and 4 delivery outlets.
The problem that matrix keyboard of the prior art exists is that port all is unidirectional input/output port, so in some application systems, when existing to chip cost, number of pin and chip entire area require relatively stricter situation, this matrix keyboard with one way ports still needs to take a large amount of chip I/O resource, and then causing chip pin to increase, packaging cost certainly will increase.
The utility model content
The technical problems to be solved in the utility model is that matrix keyboard of the prior art is improved, provide a kind of low-cost push button signalling Acquisition Circuit, be used for solving prior art and take a large amount of chip I/O resource, cause Chip Packaging cost problem of higher.
In order to address the above problem, the utility model provides a kind of low-cost push button signalling Acquisition Circuit, comprises matrix keyboard and push button signalling acquisition module,
Described matrix keyboard comprises N mouthful and 1 GND/VDD mouth, and on-off element, described N mouthful all is bidirectional interface, any two are connected with the two poles of the earth of on-off element respectively in N the mouth, and N mouthful be connected with an end of on-off element, and its other end all is connected to the GND/VDD mouth.
Described push button signalling acquisition module comprises N pin, and N mouth with matrix keyboard electrically connects respectively, and comprises clock signal circuit.
In N the pin in the described push button signalling acquisition module each all is connected the input end of back as Sheffer stroke gate with the not gate of two series connection, another input end of this Sheffer stroke gate connects non-this pin that connects again behind the door.
Described N is the natural number greater than zero.
Described on-off element is the NMOS pipe.
Described clock signal circuit further comprises inner RC and outside OSC.
The beneficial effects of the utility model are, unidirectional mouthful of matrix keyboard of the prior art changed into bidirectional interface, wherein any two mouths can form a button, for example just can realize that with N+1 mouth maximum is N * (N-1)/2+N by bond number, thereby under the situation that realizes same key quantity, utilize matrix keyboard in the utility model to reduce the usage quantity of chip pin, saved cost.
Above-mentioned summary description of the present utility model does not mean that the content that substitutes each embodiment, various aspects perhaps of the present utility model.Other aspects and other embodiment will be with reference to graphic and detailed descriptions hereinafter.
Description of drawings
Fig. 1 is for being the circuit diagram of matrix keyboard in the prior art of example with 4 * 4 matrix keyboards.
Fig. 2 is the circuit diagram of matrix keyboard in a kind of low-cost button Acquisition Circuit of the utility model embodiment that is example with 8+1 port.
Fig. 3 is the synoptic diagram of a kind of low-cost push button signalling Acquisition Circuit of the utility model embodiment.
Fig. 4 is the inner circuit diagram that connects of a kind of low-cost push button signalling Acquisition Circuit middle port of the utility model embodiment.
Fig. 5 is the synoptic diagram of a kind of low-cost push button signalling Acquisition Circuit holding state lower port level state of the utility model embodiment.
The synoptic diagram of port level state when Fig. 6 presses for the effective key of a kind of low-cost push button signalling Acquisition Circuit of the utility model embodiment.
Embodiment
The utility model is an example with 8+1 port, and the matrix keyboard in a kind of low-cost button Acquisition Circuit of the utility model embodiment is described.As shown in Figure 2, the matrix keyboard port that the button Acquisition Circuit in the utility model adopts is set to bidirectional port, thereby any two mouths can form a button.
Described matrix keyboard comprises: 8 mouth S1-S8,1 GND/VDD mouth and 36 button Key1-Key36 that formed by the NMOS pipe.After representing to be connected with the pin of chip, described 8 mouth S1-S8 are in the port of chip internal.Therefore 8 mouth S1-S8 in the utility model all are set to bidirectional interface, and any two mouths among 8 mouth S1-S8 can form 28 buttons, and 8 mouths form 8 buttons again with the GND/VDD mouth respectively, and maximum the realization by bond number is 36.The physical circuit annexation is as follows, with port S1 and S2 is example, port S1 is connected with the source electrode of NMOS pipe Key1, the drain electrode of this NMOS pipe Key1 is connected with port S2, thereby form the unit keypad circuit of button Key1, and the like, finally can form the matrix keyboard circuit that constitutes by button Key1-Key36.
Above-mentioned matrix keyboard constitutes the push button signalling Acquisition Circuit with the push button signalling acquisition module usually, is applied to chip cost, and number of pin and chip entire area require in the relatively stricter System on Chip/SoC.As shown in Figure 3, the synoptic diagram that has shown a kind of low-cost push button signalling Acquisition Circuit of the utility model.A kind of low-cost push button signalling Acquisition Circuit of the utility model comprises: matrix keyboard 1 and push button signalling acquisition module 2.Wherein, described matrix keyboard 1 comprises 8 mouths and 1 GND/VDD mouth, and the on-off element of NMOS pipe conduct, described 8 mouths all are bidirectional interface, any two are connected with the two poles of the earth of on-off element respectively in 8 mouths, and 8 mouths are connected with an end of on-off element, and its other end all is connected to the GND/VDD mouth.
Described push button signalling acquisition module 2 comprises 8 pins, and 8 mouths with matrix keyboard electrically connect respectively, and further comprise clock signal circuit.
Described clock signal circuit further comprises inner RC and outside OSC.
The course of work of push button signalling Acquisition Circuit is described below with reference to Fig. 4 to Fig. 6.At first will to the port of matrix keyboard with carry out chip internal after chip pin is connected and handle, thereby realize the push button signalling acquisition function.Fig. 4 is the inner circuit diagram that connects of a kind of low-cost push button signalling Acquisition Circuit middle port of the utility model embodiment.As shown in the figure, be example with port S1, port S1 connects the input end of back as Sheffer stroke gate 13 with two not gates of connecting 11,12, connects this port S1 again after another input end of this Sheffer stroke gate 13 connects a not gate 14.The output of Sheffer stroke gate 13 meets signal Key_en, and the input of not gate 14 meets signal scan.Wherein, signal Key_en and signal scan are the internal signal in the push button signalling acquisition module 2.Signal scan is the signal that scanning is provided for pin, and signal Key_en is the signal of the effective button of expression, is used for when low pulse occurring, and expression has effective button to press.Next, the course of work of the low-cost button acquired signal of the utility model circuit is described.
Fig. 5 is the view of a kind of low-cost push button signalling Acquisition Circuit holding state lower port of the utility model.The synoptic diagram of port level state when Fig. 6 presses for the effective key of a kind of low-cost push button signalling Acquisition Circuit of the utility model embodiment.As shown in Figure 5, when the push button signalling Acquisition Circuit was in holding state, sweep signal scan scanned one by one to the port S1-S8 of matrix keyboard, and the result is that all ports all are in fixing level state.At this moment, these fixed level states provide clock signal by the inside RC in the clock signal circuit and obtain, and then are that the collection of push button signalling is ready.
As shown in Figure 6, the push button signalling Acquisition Circuit is started working, sweep signal scan scans one by one to the port S1-S8 of matrix keyboard, if the button that this moment, port S1 and S2 formed is pressed, then the level state of port S1 and S2 becomes identically, and a low pulse can appear in the Key_en signal afterwards, represents that effective button presses, thereby this push button signalling is gathered, changed into outside OSC by inner RC immediately and finish the work in case collect push button signalling.Whole process is simple, utilizes inner RC during holding state and change the outside OSC of use into after collecting signal and carry out work, can make the quiescent dissipation of chip maintain very low level, and then reduce cost.
The utility model is described with reference to various embodiment, for those of ordinary skill in the art, will think and be included in the claimed scope of the utility model claim not breaking away from modification that spirit and scope of the present utility model do.