Specific embodiment
To make the object, technical solutions and advantages of the present invention become more apparent, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutually be combined.
As shown in figure 1, embodiments providing one kind realizes touch key-press anti-disturbance method, the method includes:
S110, it is determined that for the key assignments sampling channel of acquiring touch button value, and for the interference inspection of interference signal of sampling
Survey passage;
S120, scanning key assignments sampling channel and Interference Detection passage, judge whether according to the sampled value of the Interference Detection passage
Interference signal is detected, when judging to be not detected by interference signal, is according to the judgement of the sampled value of the key assignments sampling channel
It is no to have touch key-press to press, it is that the touch operation to the touch key-press is responded;
Methods described can also include following features:
Alternatively, the key assignments sampling channel and Interference Detection passage are the sampling channel of system;
Wherein, key assignments sampling channel connection touch key-press, by the analog quantity of the touch key-press for collecting digital quantity is converted into;
Wherein, interference sample passage is not connected to any touch key-press, and the analog quantity of the internal system thief hatch for collecting is converted
For digital quantity.
Alternatively, judge whether to detect interference signal according to the sampled value of the Interference Detection passage, including:
Whether judge the absolute value of the sampled value of the Interference Detection passage and the difference of a reference value of the Interference Detection passage
More than or equal to interference threshold, it is that judgement detects interference signal, otherwise judges to be not detected by interference signal;
Wherein, a reference value of the Interference Detection passage is adopting of obtaining in system initialization process of the Interference Detection passage
Sample value, or the sampled value that the Interference Detection passage is periodically updated after the completion of system initialization;
Alternatively, determine whether that touch key-press is pressed according to the sampled value of the key assignments sampling channel, including:
To any one key assignments sampling channel, the sampled value of the key assignments sampling channel and the base of the key assignments sampling channel are judged
Whether the absolute value of the difference of quasi- value is more than or equal to the threshold of sensitivity, is to judge the corresponding touch of the key assignments sampling channel
Button is pressed, and otherwise judges that the corresponding touch key-press of the key assignments sampling channel is not pressed;
Wherein, a reference value of the key assignments sampling channel is adopting of obtaining in system initialization process of the key assignments sampling channel
Sample value, or the sampled value that the key assignments sampling channel is periodically updated after the completion of system initialization;
Alternatively, a reference value of the key assignments sampling channel and/or Interference Detection passage, by continuous several times adopting for acquisition is scanned
The mean value of sample value determines;
As shown in Fig. 2 embodiments providing one kind realizes the jamproof device of touch key-press, including:
Sampling channel determining module 201, for determining the key assignments sampling channel for acquiring touch button value, and for adopting
The Interference Detection passage of sample interference signal;
Sampling channel scanner uni respond module 202, for scanning key assignments sampling channel and Interference Detection passage, according to the interference
The sampled value of sense channel judges whether to detect interference signal, when judging to be not detected by interference signal, according to the key
The sampled value of value sampling channel determines whether that touch key-press is pressed, and is, the touch operation to the touch key-press rings
Should.
Alternatively, the key assignments sampling channel and Interference Detection passage are the sampling channel of system;
Wherein, key assignments sampling channel connection touch key-press, by the analog quantity of the touch key-press for collecting digital quantity is converted into;
Wherein, interference sample passage is not connected to any touch key-press, and the analog quantity of the internal system thief hatch for collecting is converted
For digital quantity.
Alternatively, sampling channel scanner uni respond module 202, for being judged according to the sampled value of the Interference Detection passage
Whether interference signal is detected, including:Judge the sampled value of the Interference Detection passage and the benchmark of the Interference Detection passage
Whether the absolute value of the difference of value is more than or equal to interference threshold, is, judgement detects interference signal, otherwise judges without inspection
Measure interference signal;
Wherein, a reference value of the Interference Detection passage is adopting of obtaining in system initialization process of the Interference Detection passage
Sample value, or the sampled value that the Interference Detection passage is periodically updated after the completion of system initialization.
Alternatively, sampling channel scanner uni respond module 202, for being judged according to the sampled value of the key assignments sampling channel
Whether there is touch key-press to press, including:To any one key assignments sampling channel, judge the sampled value of the key assignments sampling channel with
Whether the absolute value of the difference of a reference value of the key assignments sampling channel is more than or equal to the threshold of sensitivity, is to judge the key
The corresponding touch key-press of value sampling channel is pressed, and otherwise judges that the corresponding touch key-press of the key assignments sampling channel is not pressed
Under;
Wherein, a reference value of the key assignments sampling channel is adopting of obtaining in system initialization process of the key assignments sampling channel
Sample value, or the sampled value that the key assignments sampling channel is periodically updated after the completion of system initialization.
Alternatively, a reference value of the key assignments sampling channel and/or Interference Detection passage, is obtained by continuous several times scanning
Sampled value mean value determine.
Example 1
In this example, one kind realizes touch key-press anti-disturbance method, comprises the steps:
S301, after system electrification, it is determined that for the key assignments sampling channel of acquiring touch button value, and for sampling interference letter
Number Interference Detection passage;
Wherein, the system includes n sampling channel, and the system can be special touch chip, it is also possible to be integrated in
Home appliance MCU(Microcontroller Unit, micro-control unit)In touch integrated circuit modules, can also be basis
The digital-to-analogue sample circuit that actual demand is built;
Wherein, in n sampling channel of the system, m sampling channel connects respectively m touch key-press, touches for gathering
The key assignments of button;Remaining n-m sampling channel is not connected to touch key-press, using in one or more of channel acquisition systems
The numerical value of portion's thief hatch, has state no interference signal by the change reflection of the numerical value for collecting;
Wherein, key assignments sampling channel is collected after the analog quantity of touching medium, and by digital-to-analogue conversion digital quantity is converted into(Key assignments)
For software identification;Interference Detection channel acquisition is converted into digital quantity to after the analog quantity of thief hatch by digital-to-analogue conversion(Interference
Value)For software identification.
Wherein, Interference Detection passage can be detected by environmental factor(Temperature, humidity change)Affect, high voltage high frequency bursts are believed
Number(Such as, EFT(Electrical Fast Transient, electrical fast transient (eft))Test)Impact, voltage ripple of power network
The fluctuation situation of the sampled data that impact causes.Interference Detection passage is not connected to any touch key-press, can avoid detection interference
When affected by manual operation.
S302, judges whether system initialization completes, and is then execution step S304, otherwise execution step S303;
S303, scanning key assignments sampling channel and Interference Detection passage, determine a reference value of each sampling channel;
Wherein it is possible to using the mean value of the sampled value of each sampling channel Multiple-Scan as the sampling channel a reference value.
S304, scanning key assignments sampling channel and Interference Detection passage;
S305, judges whether to detect interference signal according to the sampled value of Interference Detection passage, is then return to step S304, otherwise
Execution step S306;
Wherein, judge whether to detect interference signal according to the sampled value of the second sampling channel, including:
Whether judge the absolute value of the sampled value of second sampling channel and the difference of a reference value of second sampling channel
More than or equal to interference threshold, it is that judgement detects interference signal, otherwise judges to be not detected by interference signal;
Wherein, interference value is systemic presupposition value;
S306, determines whether that touch key-press is pressed according to the sampled value of each key assignments sampling channel, is then execution step S307,
Otherwise execution step S308;
Wherein, determine whether that touch key-press is pressed according to the sampled value of each key assignments sampling channel, including:
To any one key assignments sampling channel, judge that the key assignments sampling channel sampled value is with the absolute value of the difference of a reference value
No is that the touch key-press for judging the key assignments sampling channel is pressed more than or equal to the threshold of sensitivity, otherwise judges described
The touch key-press of key assignments sampling channel is not pressed;
Wherein, the threshold of sensitivity is systemic presupposition value;
S307, the touch key-press to pressing is responded;
S308, updates a reference value of key assignments sampling channel and interference sample passage, return to step S302 after the completion of renewal;
Wherein it is possible to using the mean value of the sampled value of each sampling channel Multiple-Scan as the sampling channel a reference value.
Wherein, by updating a reference value of each sampling channel, can be more responsive to the touch operation of touch key-press.Than
Such as, under hot and humid working environment, a reference value of key assignments sampling channel can be with temperature, the change of humidity gradually for soy bean milk making machine
Change, by constantly updating a reference value, can more delicately judge whether touch key-press is pressed, and prevent false triggering or touch
Touch without response.
One of ordinary skill in the art will appreciate that all or part of step in said method can be instructed by program
Related hardware is completed, and described program can be stored in computer-readable recording medium, such as read-only storage, disk or CD
Deng.Alternatively, all or part of step of above-described embodiment can also be realized using one or more integrated circuits, accordingly
Ground, each module/unit in above-described embodiment can be realized in the form of hardware, it would however also be possible to employ the shape of software function module
Formula is realized.The present invention is not restricted to the combination of the hardware and software of any particular form.
It should be noted that the present invention can also have other various embodiments, without departing substantially from spiritual and its essence of the invention
In the case of, those of ordinary skill in the art can make various corresponding changes and deformation according to the present invention, but these are corresponding
Change and deform the protection domain that should all belong to appended claims of the invention.