The adjacent key inhibition method of a kind of capacitance type touch key
Technical field
The present invention relates to the adjacent key of touch key-press and suppress the method and technology field, relate in particular to the adjacent key inhibition method of a kind of capacitance type touch key.
Background technology
Because touching, capacitive touch screen just can respond to, easy to use, and the contacting almost less than wearing and tearing of finger and touch-screen, stable performance is so capacitive touch screen has been widely used in the various electronic equipments.
At present, capacitance type touch key in the existing capacitive touch screen, caused capacitance change when the common way of its touch detecting method is the statistics touch, and then and when take place touching the electric capacity original vol compare, if satisfy the variation range or the ratio that set, judge then to touch and take place that detailed process is: as shown in Figure 1, when touch did not take place, the measured electric capacity of each button was a relative fixed value (as: baseline value B); Ideally, when some buttons are touched, cause its test value to change because electric capacity strengthens, when variation reaches designing institute preset threshold (as: threshold value A), as the button K8 among Fig. 1, judge that then this key touches.
In the middle of practical application, because press button gap is overstocked, when a certain button is touched, thereby adjacent key may be subjected to the variation that the coupling capacitance influence of human body causes its measurement capacitance, finger or pointer also may partly contact adjacent key owing to precision problem when contacting button simultaneously, thereby the capacitance variation that causes adjacent key, as shown in Figure 2.
But in requiring than higher application to touch sensitivity, adjacent key is subjected to influence recited above, may have a more than button can satisfy the touch decision threshold simultaneously, thereby causes touch difficult judgment and button false triggering, as shown in Figure 3.So, in the button distribution requires than higher application than the application of comparatively dense or to touch sensitivity, because spacing is too small between button and the button, and finger size and touching precision have larger difference, therefore when touching generation, can cause certain interference to the detection that closes on button, even cause false triggering.
Summary of the invention
The objective of the invention is to provides a kind of capacitance type touch key adjacent key inhibition method at the deficiencies in the prior art, it is by suppressing carrying out adjacent key in the touch key-press deterministic process, thereby judge the real key assignments that touch takes place, and the false triggering that button causes owing to interference around suppressing.
To achieve these goals, the invention provides the adjacent key inhibition method of a kind of capacitance type touch key, this method comprises the following steps:
A, the capacitance of all buttons is scanned, obtain the current capacitance of each button;
B, by touching decision threshold the capacitance of each button of obtaining is handled, if the capacitance variations value of button reaches the touch decision threshold, then kept this button; If the capacitance variations value of button does not reach the touch decision threshold, then reject this button;
Capacitance and the reference capacitance value of C, each button that will keep compare, and choose the button of comparing capacitance variations value maximum with the reference capacitance value then, as final reservation button;
D, will finally keep button as button output touch to take place, all the other buttons are forbidden output.
Wherein, be that the capacitance to all buttons scans simultaneously in the described steps A, obtain the current capacitance of each button.
Wherein, also can be that the capacitance to all buttons carries out sequential scanning in the described steps A, obtain the current capacitance of each button.
Beneficial effect of the present invention is: the present invention reaches the button that touches decision threshold by keeping the capacitance variations value, choose the button of comparing capacitance variations value maximum with the reference capacitance value then, as final reservation button, touch the real key assignments that takes place thereby judge, and button is realized adjacent key inhibit feature owing to disturb the false triggering that causes around suppressing.
Description of drawings
Fig. 1 is the capacitance variations synoptic diagram of existing capacitance type touch key touch detecting method button in the ideal case.
Fig. 2 is the capacitance variations synoptic diagram of existing capacitance type touch key touch detecting method button in actual applications.
Fig. 3 is the capacitance variations synoptic diagram under the existing capacitance type touch key touch detecting method affected situation of adjacent key in actual applications.
Fig. 4 scans the capacitance variations synoptic diagram of each button of back acquisition to the capacitance of all buttons when having button to take place for the adjacent key inhibition method of capacitance type touch key of the present invention.
Fig. 5 is for only keeping the synoptic diagram that the capacitance variations value reaches the button that touches decision threshold among Fig. 4.
Fig. 6 is for keeping the synoptic diagram of comparing the button of capacitance variations value maximum with the reference capacitance value among Fig. 5.
Embodiment
The present invention is further illustrated below in conjunction with accompanying drawing.
The adjacent key inhibition method of capacitance type touch key of the present invention, it comprises the following steps:
A, the capacitance of all buttons is scanned, obtain the current capacitance of each button, wherein, can adopt conventional statistical method that the capacitance of all buttons is scanned, and, when button takes place, because influences such as space, distance and contacts area, the capacitance that each button obtains will present certain difference, as the button K3~K13 among Fig. 4;
B, by touching decision threshold (A1) capacitance of each button of obtaining is handled, if the capacitance variations value of button reaches the touch decision threshold, then kept this button; If the capacitance variations value of button does not reach the touch decision threshold, then reject this button; As shown in Figure 5, only keep capacitance variations value among Fig. 4 and reach the button K5~K11 that touches decision threshold.
Capacitance and the reference capacitance value (B1) of C, each button that will keep compare, and choose the button of comparing capacitance variations value maximum with the reference capacitance value then, as final reservation button; As shown in Figure 6, finally keep the button K8 that compares capacitance variations value maximum (MAX) among Fig. 5 with the reference capacitance value.
D, will finally keep button as button output touch to take place, all the other buttons are forbidden output; As touching button output takes place as the K8 among Fig. 6, all the other buttons are forbidden output, touch the real key assignments that takes place thereby judge, and button is realized adjacent key inhibit feature owing to disturb the false triggering that causes around suppressing.
Wherein, be that the capacitance to all buttons scans simultaneously in the described steps A, obtain the current capacitance of each button; Also can be that capacitance to all buttons carries out sequential scanning in the described steps A, obtain the current capacitance of each button.
Therefore, the present invention can judge and touch the real key assignments that takes place, and button is realized adjacent key inhibit feature owing to disturb the false triggering that causes around suppressing, and avoids the judgement confusion phenomena that occurs in some special applications.
Should be noted that at last; above embodiment is only in order to illustrate technical scheme of the present invention; but not limiting the scope of the invention; although with reference to preferred embodiment the present invention has been done to explain; those of ordinary skill in the art is to be understood that; can make amendment or be equal to replacement technical scheme of the present invention, and not break away from essence and the scope of technical solution of the present invention.