CN105471438B - A kind of processing method of button clamping stagnation, apparatus and system - Google Patents
A kind of processing method of button clamping stagnation, apparatus and system Download PDFInfo
- Publication number
- CN105471438B CN105471438B CN201510837125.4A CN201510837125A CN105471438B CN 105471438 B CN105471438 B CN 105471438B CN 201510837125 A CN201510837125 A CN 201510837125A CN 105471438 B CN105471438 B CN 105471438B
- Authority
- CN
- China
- Prior art keywords
- level
- button
- row
- column
- clamping stagnation
- 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
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M11/00—Coding in connection with keyboards or like devices, i.e. coding of the position of operated keys
- H03M11/20—Dynamic coding, i.e. by key scanning
Abstract
A kind of processing method of button clamping stagnation, apparatus and system, the method are suitable for M rows N and arrange the keyboard that the button is formed, the method includes:Judge whether button clamping stagnation occur;When button clamping stagnation occurs in determination, stop key scanning;When have it is other be not pressed by the button of clamping stagnation when, restart key scan.Using the above scheme in button clamping stagnation, power consumption can be reduced, and not can be used normally by the button of clamping stagnation.
Description
Technical field
The present invention relates to control field more particularly to a kind of processing method of button clamping stagnation, apparatus and systems.
Background technology
On the similar portable device such as remote controler, low-power consumption is a very strong demand.But due to various
The reason of caused by button clamping stagnation, that is, after button is pressed, the case where can not discharging, can so that remote controler etc. is similar just
Portable device consumes many electricity.
Currently, when encountering button clamping stagnation, directly by with the button by clamping stagnation go together or the key screen of same column
Cover can cause non-clamping stagnation button can not normal use, reduce user experience;Or not by the button value by clamping stagnation
It is sent to processing unit, then key scan device can continue to scan on always button, and electric quantity consumption is big.
Invention content
Problems solved by the invention is how to reduce power consumption in button clamping stagnation, and making can be with by the button of clamping stagnation
Normal use.
To solve the above problems, the embodiment of the present invention provides a kind of processing method of button clamping stagnation, it is suitable for described in M rows N row
The keyboard that button is formed, the method includes:
Judge whether button clamping stagnation occur;
When button clamping stagnation occurs in determination, stop key scanning;
When have it is other be not pressed by the button of clamping stagnation when, restart key scan.
Optionally, described to judge whether button clamping stagnation occur, including:
When detecting interrupt signal, the interrupt signal is closed, detects the level of the row/column of the keyboard, determines institute
State in the row/column of keyboard be second electrical level row/column position, correspondingly reset the level of the column/row of the keyboard, and
In preset time, the level state after being reset described in holding to determine column/row position, wherein:At the beginning of the row/column of the keyboard
Beginningization is set as the first level, and the column/row Initialize installation of the keyboard is second electrical level, first level and described second
Level is opposite;
By by the row/column position and column/row position combination, determining the button being pressed;
When the button being pressed described in the detection is more than preset times, determine that clamping stagnation occurs in the button.
Optionally, capacitance identical with the capacitance one end of each button in the row/column is coupled, the electricity
Respectively the output end of one end of resistance identical with a resistance value and the keyboard couples the other end of appearance.
Optionally, the other end of the resistance is coupled with ground;
First level is low level, and the second electrical level is high level;
And when first level is low level, the interrupt signal is interrupted for rising edge.
Optionally, the other end and supply coupling of the resistance;
First level is high level, and the second electrical level is low level;
And when first level is high level, the interrupt signal is interrupted for failing edge.
Optionally, the level that the column/row is correspondingly set, including:
The level of the column/row is set gradually, is made other than wherein a column/row is second electrical level every time, other row/
Capable level is entirely the first level, within the preset time, detects the level of the row/column, when the row/column is
When two level, the column/row position is determined.
Optionally, the method further includes:When stop key scanning after, into dormant state.
The embodiment of the present invention provides a kind of processing unit of button clamping stagnation, and the keyboard that the button is formed is arranged suitable for M rows N,
Described device includes:
First judging unit, suitable for judging whether button clamping stagnation occur;
Second judgment unit is not pressed by the button of clamping stagnation suitable for judging whether there is other;
Scan control unit, suitable for when button clamping stagnation occurs in first judging unit determination, stop key scanning;When
Second judgment unit determination has other when not being pressed by the button of clamping stagnation, restarts key scan.
Optionally, first judging unit is detected suitable for when detecting interrupt signal, closing the interrupt signal
The level of the row/column of the keyboard determines the row/column position for second electrical level in the row/column of the keyboard, correspondingly sets again
Set the level of the column/row of the keyboard, and in preset time, the level state after being reset described in holding with determine row/
Line position is set, wherein:The row/column Initialize installation of the keyboard is the first level, and the column/row Initialize installation of the keyboard is the
Two level, first level with the second electrical level on the contrary, by the way that the row/column position and the column/row position are combined,
It determines the button that is pressed, when the button being pressed described in the detection is more than preset times, determines that clamping stagnation occurs in the button.
Optionally, first judging unit, suitable for setting gradually the level of the column/row, every time so that in addition to it
In a column/row be outside second electrical level, the level of other column/rows is entirely the first level, detects the level of the row/column, works as institute
When to state row/column be second electrical level, the column/row position is determined.
Optionally, the key control unit is further adapted for after stopping key, and control enters dormant state.
An embodiment of the present invention provides a kind of processing system of button clamping stagnation, the system comprises:It is above-described any
The processing unit of kind button clamping stagnation and the keyboard that the button is arranged including M rows N.
Optionally, capacitance identical with the capacitance one end of each button in the row/column of the keyboard is coupled,
Respectively resistance identical with a resistance value and the input terminal coupling of the other end of the capacitance.
Optionally, the other end of the resistance is coupled with ground;
First level is low level, and the second electrical level is high level;
And when first level is low level, the interrupt signal is interrupted for rising edge.
Optionally, the other end and supply coupling of the resistance;
First level is high level, and the second electrical level is low level;
And when first level is high level, the interrupt signal is interrupted for failing edge.
Compared with prior art, technical scheme of the present invention has the following advantages:
When determine there is button clamping stagnation when, directly stop key scanning process, when have it is other not by the button of clamping stagnation by by
When lower, restart key scan, can be gone together or the button of same column by the button of clamping stagnation with described to avoid masking, not only
May insure it is other not can be used normally by the button of clamping stagnation, promote user experience, and can be to avoid continuing button always
Scanning reduces power consumption.
Further, by the way that within the preset time, the level state after being reset described in holding is to determine column/row position
It sets, and detects the voltage status of keyboard row/column, so as to reduce voltage status testing result by the general of extraneous interference
Rate improves the reliability of keyboard scan.
Description of the drawings
Fig. 1 is a kind of flow diagram of the processing method of keyboard clamping stagnation in the embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of the processing system of keyboard clamping stagnation in the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of the processing system of keyboard clamping stagnation in the embodiment of the present invention;
Fig. 4 is a kind of flow diagram of the judgment method of keyboard clamping stagnation in the embodiment of the present invention;
Fig. 5 is the connection diagram of a kind of capacitance and resistance in the embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of the processing unit of keyboard clamping stagnation in the embodiment of the present invention.
Specific implementation mode
Currently, when encountering button clamping stagnation or directly by with the button by clamping stagnation go together or same column by
Key mask can cause non-clamping stagnation button can not normal use, reduce user experience;Not by the button by clamping stagnation
Key assignments is sent to processing unit, then key scan device can continue to scan on always button, and electric quantity consumption is big.
To solve the above problems, when determining that the embodiment of the present invention passes through the scanning that directly stops key when there is button clamping stagnation
Process, when have it is other be not pressed by the button of clamping stagnation when, restart key scan, can be to avoid masking with described by card
The button of stagnant button colleague or same column, not only may insure it is other not can be used normally by the button of clamping stagnation, promoted and used
Family is experienced, and can reduce power consumption to avoid key scan is continued always.
To make the above purposes, features and advantages of the invention more obvious and understandable, below in conjunction with the accompanying drawings to the present invention
Specific embodiment be described in detail.
Fig. 1 shows a kind of flow diagram of the processing method of button clamping stagnation in the embodiment of the present invention, below in conjunction with
Fig. 1 describes to the specific steps of the method in detail:
S11:Judge whether that clamping stagnation occurs in button.
In specific implementation, the processing method may be adapted to the keyboard that M rows N arranges the button formation, may be used more
Kind mode judges whether keyboard clamping stagnation situation occurs.Such as when detecting that button keeps the key assignments that is pressed it is more than the regular hour
When, it is determined that there is clamping stagnation in the button.Also for example, when detecting some button more than certain number, it is determined that the button occurs
Clamping stagnation.
When determining that clamping stagnation occurs in button, step S12 is executed;Otherwise, flow can be terminated.
S12:Stop key scanning.
In specific implementation, when determining that clamping stagnation occurs in button, can stop key scanning, in this manner it is possible to avoid shielding
Other buttons that clamping stagnation does not occur in row or column corresponding with the button for clamping stagnation occur are covered, to not influence other press
The use of key.It moreover, can be to avoid key scan be repeated always, so as to reduce by the scanning that stops key
Power consumption improves the service life.
In specific implementation, when clamping stagnation occurs in keyboard, multiple methods can realize the operation for the scanning that stops key.Than
Such as when determine there is button clamping stagnation when, the key assignments of the button detected will not change, can by the button certain
Capacitance is accessed in one end, and when the capacitance the case where charge and discharge does not occur, can stop key scanning.
S13:When have it is other be not pressed by the button of clamping stagnation when, restart key scan.
In specific implementation, it is used in order to not influence the normal operating of other buttons, it is other not by the button of clamping stagnation when having
When being pressed, key scan can be restarted.
In summary, when clamping stagnation situation occurs in button, by stop key scanning, can to avoid button by when clamping stagnation still
Scan always, so as to reduce power consumption, and when have it is other be not pressed by the button of clamping stagnation when, button can be restarted
Scanning, therefore the use of other buttons can not be influenced.
To make those skilled in the art more fully understand and realizing the present invention, Fig. 2 shows in the embodiment of the present invention
The processing method that above-mentioned button clamping stagnation may be implemented a kind of processing system, the system may include:Button clamping stagnation
Processing unit 2 and keyboard 1, the keyboard 1 include the button of M rows N row.
In specific implementation, each button in the row or column of the keyboard 1 can capacitance C identical with a capacitance
One end is coupled, the other end of the identical capacitance C of the size respectively resistance R identical with a resistance value and the keyboard 1
Output end coupling.
It should be noted that the input terminal due to the processing unit 2 in the button clamping stagnation detects level change, thus it is described
The capacitance C and resistance R can be coupled with the input terminal of the processing unit 2 of the button clamping stagnation, specifically the row of the keyboard 1
Or it arranges corresponding button to couple with the capacitance C and resistance R, any restrictions is not constituted to protection scope of the present invention.
In an embodiment of the present invention, as long as the row or column of the keyboard 1 and the processing unit 2 of the button clamping stagnation
Input terminal corresponds to coupling.Below for convenience of description, identical as a capacitance with each button in the row of the keyboard 1
The one end capacitance C coupled, and the other end of the capacitance C respectively resistance R identical with a resistance value and the keyboard 1
For the structure of output end coupling, the processing system of the button clamping stagnation is introduced and is illustrated.
It is understood that in specific implementation, the capacitance C and resistance R can be set to the execution button
It in the device 2 of the processing method of clamping stagnation, can also be set in the keyboard 1, the specific capacitance C and the installation positions resistance R
How, it does not limit the present invention in any way.
Fig. 3 shows a kind of structural schematic diagram of the processing system of button clamping stagnation in the embodiment of the present invention, wherein the key
The M rows button of disk 1 is connected by PB0-PBM interfaces with the processing unit 2 of the button clamping stagnation respectively, wherein PB0-PBM interfaces
The input terminal of processing unit 2 as the button clamping stagnation, the i.e. output end of the keyboard 1, the N row buttons point of the keyboard 1
It is not connected with the processing unit 2 of the button clamping stagnation by the interface of PA0 to PAN.
Wherein:Output end of the interface of PA0-PAN as the processing unit 2 of the button clamping stagnation, i.e., the keyboard 1 is defeated
Enter end.Wherein:Each button in the M rows of the keyboard 1 per a line is coupled with one end of the capacitance C of capacitance size, described
The other end of the identical capacitance C of the size respectively processing unit 2 of resistance R identical with a resistance value and the button clamping stagnation it is defeated
Enter end coupling.
It is understood that M=5, N=12 herein, but the sizes values of the M and N and relative size relationship are
Variable, those skilled in the art can select according to actual needs, and the value of the M and N and the opposite pass of size
System, does not form any restrictions to the present invention.
To make those skilled in the art more fully understand the realization present invention, below to the specific works mistake of the system
Journey describes in detail:
In specific implementation, the processing unit 2 of the button clamping stagnation can detect keyboard 1 whether clamping stagnation, and there are many
Mode detects whether keyboard 1 clamping stagnation situation occurs.
In an embodiment of the present invention, can be the first level the row Initialize installation of the keyboard, the keyboard
Row initialization is set as second electrical level, and first level is opposite with the second electrical level.
When detecting interrupt signal, the interrupt signal can be closed, detects the level of the row, is determined in the row
It is set for the line position of second electrical level, correspondingly resets the level of the row, and in preset time, reset described in holding
Level state afterwards, then by setting the line position and column position combines, determines the button that is pressed, so to determine column position
When the button being pressed described in the detection afterwards is more than preset times, determine that clamping stagnation occurs in the button.
The level of the row wherein can be correspondingly reset in the following manner:The level of the row is set gradually,
Every time so that other than wherein one row are second electrical levels, the level of other row is entirely the first level, when described preset
In, the level of the row is detected, when the row is second electrical level, determines the position of the row.
For example, can set the level of first row to second electrical level, the level of other row is set as the first level, accordingly
, within the preset time, capable level is detected, if certain row is second electrical level at this time, determines the button being pressed
Correspond to first row.
In specific implementation, it is high or low that those skilled in the art, which can be set according to actual needs first level,
Level.
In an embodiment of the present invention, it can be configured according to following relationship:The other end of the resistance R and ground coupling
It connects, first level is low level, and the second electrical level is high level, and when first level is low level, described
Interrupt signal is interrupted for rising edge.
In an alternative embodiment of the invention, it can be configured according to following relationship:The other end and power supply of the resistance R
Coupling, first level are high level, and the second electrical level is low level, and when first level is high level, institute
Interrupt signal is stated to interrupt for failing edge.
It is understood that the row/column is specially high or low voltage, do not limit the present invention in any way, only
It wants to meet above-mentioned correspondence i.e. at first level and the coupling of row/column, interrupt signal and the resistance R other ends
It can.It for the ease of understanding and illustrating, is illustrated herein using first voltage as low-voltage, second voltage carries out for the case where high voltage
Illustrate,
To make those skilled in the art to judging that the process whether keyboard clamping stagnation occurs more fully understands and realizes, scheme
4 show in the embodiment of the present invention it is a kind of judge keyboard whether the flow diagram of the processing method of clamping stagnation, below in conjunction with figure
1-4 judges whether the course of work of clamping stagnation is introduced keyboard to system described in one embodiment of the invention:
S41:It is set as rising edge interrupting input by PB mouthfuls, PB mouthfuls are low level input, and PA mouthfuls are high level.
In specific implementation, PB mouthfuls of interrupt signal form can be set, in this way, when a button is pressed on keyboard,
The PB mouthfuls of level states for having a port are redirected from low level as high level, to send the interruption letter for rising edge form
Number.
S42:Judge whether PB mouthfuls have rising edge interruption.
In specific implementation, in order to judge whether to need open keyboard scan process, it can be determined that whether PB mouthfuls have rising
Along interruption.
When having rising edge interruption for PB mouthfuls, determines and generate the corresponding position of PB mouths that rising edge interrupts, for example can be
PBm can then execute S43;Otherwise, flow can be terminated.
It should be noted that the processing unit 2 of the button clamping stagnation can detect button that is multiple while being pressed, namely
It is Macintosh, that is to say, that in the same time, it can be determined that whether have multiple PB mouthfuls to have rising edge interruption, and right simultaneously respectively
It is handled.Citing herein only has PBm a line to detect that rising edge interrupts, and is intended merely to so that those skilled in the art are more preferable
Ground understands and realizes the present invention, does not constitute any restrictions, in actual use, the button card to protection scope of the present invention
The scanning process of Macintosh may be implemented in stagnant processing method.
S43:It closes the rising edge to interrupt, common input port is set as PB mouthfuls.
In specific implementation, when detecting that PB mouthfuls have rising edge interruption, it may be determined that a button is pressed on keyboard, from
And the processing unit 2 of button clamping stagnation can be waken up, closing the rising edge interrupts, and common input port is set as PB mouthfuls, to start
Keyboard scan process.
S44:The level of the row is set gradually, is made every time other than wherein one row are high level, the electricity of other row
Flat is entirely that low level detects the level of the row in the preset time t, when the row is high level, determines institute
State column position n.
For example it is high level that the (n+1)th row PAn can be arranged first, while the row being arranged other than PAn are low level,
And preset time t is kept, then in the preset time t, the level state of the input terminal PB0 to PBM is detected, when
In this case, when detection PBm is high level, the row n for the button that is pressed described in determination.Wherein, the preset time t with
The capacitance of the capacitance C and the resistance value of the resistance R are related.
In this way, passing through the row value m in conjunction with the predetermined button that is pressed, it may be determined that the button being pressed
For m+1 rows, the button of the (n+1)th row.
It is understood that the processing unit 2 of the button clamping stagnation can detect button that is multiple while being pressed, namely
It is Macintosh, that is to say, that no matter n is how many, and the processing unit can set gradually the level state of N number of row, will not be true
The button that a n value sets gradually other row with regard to stopping later being determined.When citing herein only has setting PAn mono- to be classified as high level,
High level can be detected at PB mouthfuls, be intended merely to so that those skilled in the art more fully understand and realize the present invention, not
Any restrictions are constituted to protection scope of the present invention, in actual use, group may be implemented in the processing method of the button clamping stagnation
Close the scanning process of key.
To make those skilled in the art more fully understand and realizing that the present invention, Fig. 5 are shown in the embodiment of the present invention
Capacitance connection figure corresponding with resistance shown in a kind of and Fig. 3, wherein for convenience of description, the processing of button clamping stagnation is indicated with PBi
One input port of device 2,0≤i≤M indicate 2 one output ports of processing unit of button clamping stagnation, 0≤j≤N with PAj.
Referring to Fig. 5, carried out by taking the relationship between the resistance and capacitance on an output end in wherein keyboard 1 as an example
It is described in detail.
Using V0 as the initial voltage value on capacitance C, V1 is the voltage value that capacitance C finally can be charged to or be put into, and Vt is t moment
Voltage value on capacitance, t are the preset time, then above-mentioned parameter meets relationship shown in formula (1):
Vt=V0+ (V1-V0) * [1-exp (- t/RC)] (1)
The value that t can be obtained from formula (1), as shown in formula (2):
T=RC*Ln [(V1-V0)/(V1-Vt)] (2)
Work as Vt=0.9VCC and obtains formula (3) when that is, the voltage value on t moment capacitance is 0.9VCC:
0.9VCC=0+VCC* [[1-exp (- t/RC)] (3)
The derivation for passing through (4)-(7) successively, obtains the value of t:
[1-exp (- t/RC)]=0.9 (4)
Exp (- t/RC)=0.1 (5)
- t/RC=ln (0.1) (6)
T/RC=ln (10) (7)
It can obtain:T=2.3RC
In an embodiment of the present invention, R=10k C=0.1uf can be obtained:
T=2.3*10k*0.1uf=2.3ms, i.e., the described preset time take 2.3ms.
It should be noted that those skilled in the art can according to actual needs, by the resistance value R for choosing the resistance
And the capacitance C of the capacitance, so that it is determined that the size of the preset time t.And the resistance value R and the electricity of the resistance
The capacitance for holding C does not limit the present invention in any way.Also, by the way that the voltage after the setting is kept described preset
Time t, and the voltage status of the input terminal is detected in the preset time t, the reliability of keyboard scan can be improved.
S45:Judgement detects the m+1 rows, and whether the touch potential of the (n+1)th row is more than preset times.
In specific implementation, the number that can be detected with m+1 rows described in cumulative calculation, the (n+1)th button arranged, with true
Determine button clamping stagnation whether be in the presence of.
When detecting the m+1 rows, the touch potential of the (n+1)th row is more than preset times, and determination button clamping stagnation occurs, holds
Row S12, conversely, then executing S46.
S46:According to rows and columns, the corresponding key value of the button is calculated, and the key value is sent to processing unit.
In specific implementation, if not occurring button clamping stagnation, the corresponding button of the button can be calculated according to rows and columns
Value, and the key value is sent to processing unit so that the processing unit executes corresponding operation according to the key value.
In specific implementation, the row initialization of the keyboard can also be set as the first level, at the beginning of the row of the keyboard
Beginningization is set as second electrical level, and first level is opposite with the second electrical level.For this keyboard structure, it is being embodied
In, when detecting interrupt signal, the interrupt signal can be closed, detects the level of the row, determines in the row to be the
The column position of two level correspondingly resets the level of the row, and in the preset time, is reset described in holding
Level state afterwards, then by setting the line position and column position combines, determines the button that is pressed, so to determine that line position is set
When the button being pressed described in the detection afterwards is more than preset times, determine that clamping stagnation occurs in the button.
In specific implementation, the level of the row can be reset in the following manner, such as:Every time so that in addition to
Wherein a line is outside second electrical level, and the level of other rows is entirely the first level, within the preset time, detects the row
Level, when it is described row be second electrical level when, determine that the line position is set.
Also for example, can set the level of the first row to second electrical level, the level of other rows is set as the first level, phase
It answers, within the preset time, detects the level of row, if certain row is second electrical level at this time, be pressed described in determination
Key position correspond to row at this time.
When the rows and columns level of the keyboard is arranged in the way of in described another embodiment of the present invention, the keyboard
The specific workflow for judging whether there is button clamping stagnation of clamping stagnation processing unit 2 be referred to Fig. 4 implementations, it is no longer superfluous herein
It states.
It is understood that there is no absolutely between the level of the row and column and first level and the second electrical level
To correspondence, the row can be set to first level and it is described row be set as the second electrical level, can also
It sets the row to first level and the row is set as the second electrical level.Its specific correspondence, not to this
Invention constitutes any restrictions.
In conclusion when the initial voltage of the input terminal of the processing unit of button clamping stagnation is high level, button clamping stagnation
When the initial voltage of the output end of processing unit is low level, when a button is pressed, capacitance C chargings are pressed with described
The corresponding button clamping stagnation of button processing unit input terminal voltage rise, generate input interrupt signal, in described
Break signal can wake up the processing unit of button clamping stagnation, and make the processing unit start button scanning of the button clamping stagnation, press
During key scanning, can the output end of the processing unit of button clamping stagnation be set as high level by column, with determination it is described by by
The corresponding row of lower button.
Due to when if a button is pressed, the input terminal of the processing unit of key clamping stagnation has high level pulse appearance, dimension
Holding the time is approximately equal to the preset time t, and button clamping stagnation once occurs, since button does not change, is pressed with described
The corresponding capacitance of key does not have impulse electricity process, then the input terminal of the processing unit of corresponding button clamping stagnation not will produce level arteries and veins
Punching, thus can directly end key sweep, the input terminal of the processing unit of the button clamping stagnation and output end are set to described initial
Voltage, and it is directly entered suspend mode.So as to reduce power consumption, and ensure it is other not by the button of clamping stagnation can by normal use,
Therefore user experience can be promoted.
To make those skilled in the art more fully understand and realizing the present invention, one kind also provided below may be implemented
The device of the processing method of above-mentioned keyboard clamping stagnation.
Fig. 6 shows that a kind of processing unit of keyboard clamping stagnation in the embodiment of the present invention, described device 2 may include:The
One judging unit 21, second judgment unit 22 and scan control unit 23, wherein:
First judging unit 21, suitable for judging whether button clamping stagnation occur;
The second judgment unit 22 other is not pressed by the button of clamping stagnation suitable for judging whether there is;
The scan control unit 23, suitable for when button clamping stagnation occurs in first judging unit 21 determination, stopping pressing
Key scanning;When the second judgment unit 22 determination have it is other be not pressed by the button of clamping stagnation when, restart key scan.
In specific implementation, first judging unit 21, suitable for when detecting interrupt signal, closing the interruption letter
Number, the level of the row/column is detected, the row/column position for second electrical level in the row/column is determined, correspondingly resets institute
The level of column/row is stated, and in the preset time, the level state after being reset described in holding is to determine column/row position.
Wherein:The row/column Initialize installation of the keyboard is the first level, and the column/row Initialize installation of the keyboard is second electrical level,
With the second electrical level on the contrary, by being combined the row/column position and column/row position, determination is pressed first level
Button determine that clamping stagnation occurs in the button when button being pressed described in the detection is more than preset times.
In specific implementation, capacitance identical with the capacitance side of each button in the row/column is coupled,
Respectively resistance identical with a resistance value and the input terminal coupling of the other side of the identical capacitance of the size;
First level is high level, and the second electrical level is low level;Or first level is low level, it is described
Second electrical level is high level;
And when first level is high level, the interrupt signal is interrupted for rising edge, when first level is
When low level, the interrupt signal is interrupted for failing edge.
In specific implementation, first judging unit 21 makes every time suitable for setting gradually the level of the column/row
It obtains other than wherein a column/row is second electrical level, the level of other column/rows is entirely the first level, detects the electricity of the row/column
It is flat, when the row/column is second electrical level, determine the column/row position.
In specific implementation, the scan control unit 23, is further adapted for after stopping key, and control enters dormant state.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in computer readable storage medium, to store
Medium may include:ROM, RAM, disk or CD etc..
Although present disclosure is as above, present invention is not limited to this.Any those skilled in the art are not departing from this
It in the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute
Subject to the range of restriction.
Claims (11)
1. a kind of processing method of button clamping stagnation arranges the keyboard that the button is formed, which is characterized in that the M rows N suitable for M rows N
Capacitance identical with capacitance one end of each button in any row/column in row is coupled, the capacitance it is another
Respectively the output end of one end of resistance identical with a resistance value and the keyboard couples at end, the method includes:
Judge whether button clamping stagnation occur;
When button clamping stagnation occurs in determination, stop key scanning;
When have it is other be not pressed by the button of clamping stagnation when, restart key scan;
It is described to judge whether button clamping stagnation occur, including:When detecting interrupt signal, the interrupt signal is closed, detects institute
The level for stating the row/column of keyboard determines the row/column position for second electrical level in the row/column of the keyboard, correspondingly resets
The level of the column/row of the keyboard, and in preset time, the level state after being reset described in holding is to determine column/row
Position, wherein:The row/column Initialize installation of the keyboard is the first level, and the column/row Initialize installation of the keyboard is second
Level, first level are opposite with the second electrical level;By combining the row/column position and the column/row position, really
Surely the button being pressed;When the button being pressed described in the detection is more than preset times, determine that clamping stagnation occurs in the button.
2. the processing method of button clamping stagnation according to claim 1, which is characterized in that the other end of the resistance and ground coupling
It connects;
First level is low level, and the second electrical level is high level;
And when first level is low level, the interrupt signal is interrupted for rising edge.
3. the processing method of button clamping stagnation according to claim 1, which is characterized in that the other end and power supply of the resistance
Coupling;
First level is high level, and the second electrical level is low level;
And when first level is high level, the interrupt signal is interrupted for failing edge.
4. the processing method of button clamping stagnation according to claim 1, which is characterized in that it is described be correspondingly arranged it is described row/
Capable level, including:
The level of the column/row is set gradually, is made other than wherein a column/row is second electrical level every time, other column/rows
Level is entirely the first level, within the preset time, detects the level of the row/column, when the row/column is the second electricity
Usually, the column/row position is determined.
5. the processing method of button clamping stagnation according to claim 1, which is characterized in that further include:When the scanning that stops key
Afterwards, into dormant state.
6. a kind of processing unit of button clamping stagnation arranges the keyboard that the button is formed, which is characterized in that the M rows N suitable for M rows N
Capacitance identical with capacitance one end of each button in any row/column in row is coupled, the capacitance it is another
Respectively the output end of one end of resistance identical with a resistance value and the keyboard couples at end, and described device includes:
First judging unit, suitable for judging whether button clamping stagnation occur;When detecting interrupt signal, the interruption letter is closed
Number, the level of the row/column of the keyboard is detected, determines the row/column position for second electrical level in the row/column of the keyboard, accordingly
Ground resets the level of the column/row of the keyboard, and in preset time, the level state after being reset described in holding with
Determine column/row position, wherein:The row/column Initialize installation of the keyboard is the first level, and the column/row of the keyboard initializes
It is set as second electrical level, first level is with the second electrical level on the contrary, by by the row/column position and the column/row
Position combines, and determines the button that is pressed, when the button being pressed described in the detection is more than preset times, determines that the button goes out
Existing clamping stagnation;
Second judgment unit other is not pressed by the button of clamping stagnation suitable for judging whether there is;
Scan control unit, suitable for when button clamping stagnation occurs in first judging unit determination, stop key scanning;When described
Second judgment unit determination has other when not being pressed by the button of clamping stagnation, restarts key scan.
7. the processing unit of button clamping stagnation according to claim 6, which is characterized in that first judging unit is suitable for
The level of the column/row is set gradually, is made other than wherein a column/row is second electrical level every time, the level of other column/rows
Entirely the first level detects the level of the row/column, when the row/column is second electrical level, determines the column/row position.
8. the processing unit of button clamping stagnation according to claim 6, which is characterized in that the scan control unit, it is also suitable
In after stopping key, control enters dormant state.
9. a kind of processing system of button clamping stagnation, which is characterized in that including:Claim 6 to 8 any one of them button clamping stagnation
Processing unit and the keyboard of the button is arranged including M rows N.
10. the processing system of button clamping stagnation according to claim 9, which is characterized in that the other end of the resistance and ground
Coupling;
First level is low level, and the second electrical level is high level;
And when first level is low level, the interrupt signal is interrupted for rising edge.
11. the processing system of button clamping stagnation according to claim 9, which is characterized in that the other end of the resistance and electricity
Source couples;
First level is high level, and the second electrical level is low level;
And when first level is high level, the interrupt signal is interrupted for failing edge.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510837125.4A CN105471438B (en) | 2015-11-26 | 2015-11-26 | A kind of processing method of button clamping stagnation, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510837125.4A CN105471438B (en) | 2015-11-26 | 2015-11-26 | A kind of processing method of button clamping stagnation, apparatus and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105471438A CN105471438A (en) | 2016-04-06 |
CN105471438B true CN105471438B (en) | 2018-10-02 |
Family
ID=55608806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510837125.4A Active CN105471438B (en) | 2015-11-26 | 2015-11-26 | A kind of processing method of button clamping stagnation, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105471438B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113946226A (en) * | 2020-07-15 | 2022-01-18 | 炬芯科技股份有限公司 | Key processing method and device, readable storage medium and electronic equipment |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7158056B2 (en) * | 2004-07-08 | 2007-01-02 | Cypress Semiconductor Corporation | Method and apparatus for scanning a key or button matrix |
CN100550636C (en) * | 2007-03-28 | 2009-10-14 | 北京中星微电子有限公司 | Solve device, method and the keyboard scanning system of level conflict in the keyboard scan |
JP4916959B2 (en) * | 2007-06-19 | 2012-04-18 | 富士通株式会社 | KEY CONTROL CIRCUIT, ELECTRONIC DEVICE, PORTABLE DEVICE, AND KEY CONTROL METHOD |
US8525798B2 (en) * | 2008-01-28 | 2013-09-03 | Cypress Semiconductor Corporation | Touch sensing |
CN101872172B (en) * | 2009-04-22 | 2012-05-30 | 凌通科技股份有限公司 | Sleep mode power saving method, keyboard control circuit and triangular scanning keyboard |
CN103257716B (en) * | 2013-05-14 | 2015-11-18 | 湖南工业大学 | A kind of low-power consumption keyboard and Scan orientation method thereof |
-
2015
- 2015-11-26 CN CN201510837125.4A patent/CN105471438B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105471438A (en) | 2016-04-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4981120B2 (en) | Method and related apparatus for detecting a touch event on a touch panel | |
US10170070B2 (en) | Display apparatus with testing functions and driving circuit and driving method thereof | |
GB2550708A (en) | Display panel having touch function and fault detection method | |
US10025438B2 (en) | Device and method for detecting defects in self-capacitive touch panel | |
CN103677449A (en) | Method for adjusting scanning frequency of touch screen and electronic terminal | |
CN103713784A (en) | Capacitive touch detecting circuit, device and identification method capable of preventing mistakes caused by stains | |
CN105204684B (en) | Touch-screen driving frequency control method, device and electronic equipment | |
CN103617002A (en) | Method and device for achieving touch interface | |
CN103543344B (en) | A kind of method solving capacitance plate inefficacy and capacitance plate abnormity detecting circuit | |
US20190391723A1 (en) | Touch recognition method, touch device | |
CN106201175B (en) | Location regulation method, device and the terminal of application icon | |
US9612682B2 (en) | Touch panel and method for detecting the same | |
CN105471438B (en) | A kind of processing method of button clamping stagnation, apparatus and system | |
US9406282B2 (en) | Display protection for invalid timing signals | |
KR101337855B1 (en) | Apparatus and method for detecting a switch fault | |
CN110703892A (en) | EC reset circuit and electronic equipment based on USB C type interface | |
CN107292279B (en) | Display method, display device, terminal and computer-readable storage medium | |
CN105426040A (en) | Method and system for rapidly displaying interface contents of mobile terminals | |
TWI771637B (en) | Touch panel device, touch panel device control method, program, and non-transitory tangible computer-readable storage medium having the program stored therein | |
CN105389116A (en) | Terminal application processing method and system for terminal device, and terminal device | |
CN108391261A (en) | A kind of bluetooth discovery detection method, detection device, storage medium and mobile terminal | |
CN107421210A (en) | The method of refrigerator detection human body proximity and the refrigerator using this method | |
CN105320316A (en) | Method and device for debouncing of touch screen and terminal | |
US10175840B2 (en) | Terminal, touch control unit, touchscreen, screen protector, and operation detection apparatus and method | |
CN106339106A (en) | Terminal approach detection method and device and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |