CN102185602A - Refrigerator controller touch button sampling method - Google Patents
Refrigerator controller touch button sampling method Download PDFInfo
- Publication number
- CN102185602A CN102185602A CN2011100478857A CN201110047885A CN102185602A CN 102185602 A CN102185602 A CN 102185602A CN 2011100478857 A CN2011100478857 A CN 2011100478857A CN 201110047885 A CN201110047885 A CN 201110047885A CN 102185602 A CN102185602 A CN 102185602A
- Authority
- CN
- China
- Prior art keywords
- button
- sampling
- timer
- refrigerator controller
- steps
- 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.)
- Granted
Links
Images
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
The invention discloses a refrigerator controller touch button sampling method, comprising steps of system initialization and main program entering. System initialization comprises four steps: initializing a port, setting a reference level of a comparator, setting a timing interruption interval by a timer 0, and setting a timer 1 to be a counter, wherein a processing program of arranging a timing interruption interval by the timer 0 comprises: determining if the time interval reaches 2ms, carrying out button sampling, determining if the time interval reaches 5s, self-repairing subprogram and carrying out button output. A calculating procedure of the button sampling is combined with IIRfilter algorithm to calculate counter value of each button. The refrigerator controller touch button sampling method can improves sensitivity in touch button operation, preventing spurious triggering.
Description
Technical field
The present invention relates to a kind of refrigerator controller button field, especially relate to a kind of refrigerator controller touch key-press method of sampling.
Background technology
Refrigerator is more and more universal in our daily life, and the button of current refrigerator mostly is machine commandment button greatly, and is easy to wear, and the life-span is short.And another kind of button, promptly touch key-press is as a kind of novel key technology of pressing, and technology is day by day ripe, and its biggest advantage is that the life-span is long, and response is fast, more and more is applied in the household electrical appliances.
At present touch key-press adopts the method for A/D sampling or timer counter mostly, and when adopting the method for timer counter, the methods of average that adopt in the sampling of calculating button again in conjunction with the percentage method of adjusting, detect and have or not key to press or discharge more.
Insufficient sensitivity when such touch key-press method of sampling causes the touch key-press operation has the false triggering phenomenon.
Summary of the invention
The purpose of this invention is to provide a kind of refrigerator controller touch key-press method of sampling, by improving that the touch key-press sampling algorithm adds that big key is pressed and the percentage of the count value that difference when discharging or button discharge, to improve the sensitivity of button, eliminate the false triggering phenomenon under the various environment.
For achieving the above object, the present invention realizes by following technological means:
At the method that adopts timer counter, its key step of the control program of the touch key-press method of sampling is the initialization of following system and enters main program two parts that wherein main program partly is a prior art.
At the method for system initialization, mainly comprise following a few step:
One, port initialization;
Two, the reference level of comparator is set;
Three, timer 0 is provided with regularly break period;
Four, timer 1 is set to counter.
In the above-mentioned steps first and second, four steps are prior art, comprise following content at the 3rd handling procedure step that goes on foot the timer 0 that relates to:
(1) judges whether arrive 2ms break period;
(2) button sampling;
(3) judge whether arrive 5s break period;
(4) selfreparing subprogram;
(5) button output.
Calculation procedure at above-mentioned (two) step button sampling comprises following content:
(1) judges whether the number of keys of circulating sampling arrives four first;
(2) calculate the mean value of each button;
(3) adopt IIR Filter algorithm, calculate the count value of each button;
(4) judged whether that key presses;
(5) put corresponding keys and press sign.
Implement a kind of refrigerator controller touch key-press method of sampling of the present invention, have following beneficial effect: sensitivity improves in the time of can making the touch key-press operation, prevents the false triggering phenomenon.
Description of drawings
Fig. 1: touch key-press main program flow schematic diagram.
Fig. 2: touch key system initialization schematic flow sheet.
Fig. 3: touch key-press timing routine schematic flow sheet.
Fig. 4: touch key-press sampling calculation process schematic diagram.
Embodiment
As shown in Figure 1, be touch key-press main program flow schematic diagram.At the method that adopts timer counter, its key step is following two parts: first is the initialization of system; Second portion is a watchdog zero clearing, drives timer 0 and interrupts.Wherein second portion is a prior art.
At the method for above-mentioned first system initialization, as shown in Figure 2, be touch key system initialization schematic flow sheet, mainly comprise following a few step:
One, port initialization;
Two, the reference level of comparator is set;
Three, timer 0 is provided with regularly that be 2ms break period;
Four, timer 1 is set to counter.
In above-mentioned four steps first and second, four steps are for prior art, and the handling procedure step of the timer 0 that relates at the 3rd step as shown in Figure 3, is a touch key-press timing routine schematic flow sheet, comprises following content:
(1) judges whether arrive 2ms break period, if no show, then this EP (end of program); If arrive and then forward next step to;
(2) button sampling calculation procedure;
(3) judge whether arrive 5s break period, then change next step over to if arrive; If no show is then directly skipped next step;
(4) selfreparing subprogram;
(5) button output.
At above-mentioned (two) step button sampling calculation procedure, as shown in Figure 4, be touch key-press sampling calculation process schematic diagram, comprise following content:
(1) judges whether the number of keys of circulating sampling arrives four first, then change next step over to if arrive; If no show is then directly skipped next step;
(2) calculate the mean value of each button;
(3) adopt IIR Filter algorithm, calculate the count value of each button;
(4) judged whether that key presses, if then change next step over to; If then directly do not skip next step termination routine;
(5) put corresponding keys and press sign.
Claims (2)
1. refrigerator controller touch key-press method of sampling, comprise the initialization of system and enter main program two parts, wherein system initialization comprises port initialization again, reference level, timer 0 that comparator is set be provided with regularly that break period, timer 1 are set to four steps of counter, and the handling procedure of break period may further comprise the steps to it is characterized in that being provided with regularly by timer 0:
(1) judges whether arrive 2ms break period;
(2) button sampling;
(3) judge whether arrive 5s break period;
(4) selfreparing subprogram;
(5) button output.
2. the refrigerator controller touch key-press method of sampling as claimed in claim 1 is characterized in that the calculation procedure of (two) step button sampling comprises following steps:
(1) judges whether the number of keys of circulating sampling arrives four first;
(2) calculate the mean value of each button;
(3) adopt IIR Filter algorithm, calculate the count value of each button;
(4) judged whether that key presses;
(5) put corresponding keys and press sign.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110047885 CN102185602B (en) | 2011-03-01 | 2011-03-01 | Refrigerator controller touch button sampling method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110047885 CN102185602B (en) | 2011-03-01 | 2011-03-01 | Refrigerator controller touch button sampling method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102185602A true CN102185602A (en) | 2011-09-14 |
CN102185602B CN102185602B (en) | 2013-04-24 |
Family
ID=44571681
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201110047885 Active CN102185602B (en) | 2011-03-01 | 2011-03-01 | Refrigerator controller touch button sampling method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102185602B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103580665A (en) * | 2012-07-31 | 2014-02-12 | 富士通半导体股份有限公司 | Touch judgment device and method, touch switch system and electronic device |
CN111026286A (en) * | 2019-10-14 | 2020-04-17 | 宁波方太厨具有限公司 | Anti-interference processing method for capacitive touch keys |
CN113406918A (en) * | 2020-09-22 | 2021-09-17 | 郑州嘉晨电器有限公司 | Safe operation equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6643785B1 (en) * | 1999-09-27 | 2003-11-04 | Kabushiki Kaisha Toshiba | Interruption control circuit for use in an apparatus having a microcomputer |
CN101365078A (en) * | 2008-09-17 | 2009-02-11 | 四川长虹电器股份有限公司 | Remote control command code forwarding method for television set receiver |
CN101867844A (en) * | 2010-05-31 | 2010-10-20 | 深圳创维-Rgb电子有限公司 | Method, device and television for detecting panel key |
-
2011
- 2011-03-01 CN CN 201110047885 patent/CN102185602B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6643785B1 (en) * | 1999-09-27 | 2003-11-04 | Kabushiki Kaisha Toshiba | Interruption control circuit for use in an apparatus having a microcomputer |
CN101365078A (en) * | 2008-09-17 | 2009-02-11 | 四川长虹电器股份有限公司 | Remote control command code forwarding method for television set receiver |
CN101867844A (en) * | 2010-05-31 | 2010-10-20 | 深圳创维-Rgb电子有限公司 | Method, device and television for detecting panel key |
Non-Patent Citations (2)
Title |
---|
周兴华: "一种新颖的单片机按键输入设计方法详解", 《电子制作》 * |
徐彩霞: "新型非编码式键盘扫描方法研究", 《苏州市职业大学学报》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103580665A (en) * | 2012-07-31 | 2014-02-12 | 富士通半导体股份有限公司 | Touch judgment device and method, touch switch system and electronic device |
CN111026286A (en) * | 2019-10-14 | 2020-04-17 | 宁波方太厨具有限公司 | Anti-interference processing method for capacitive touch keys |
CN113406918A (en) * | 2020-09-22 | 2021-09-17 | 郑州嘉晨电器有限公司 | Safe operation equipment |
CN113406918B (en) * | 2020-09-22 | 2022-03-18 | 河南嘉晨智能控制股份有限公司 | Safe operation equipment |
Also Published As
Publication number | Publication date |
---|---|
CN102185602B (en) | 2013-04-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102185602B (en) | Refrigerator controller touch button sampling method | |
CN103120576B (en) | The draining of dish-washing machine controls testing circuit, dish-washing machine and draining thereof and detection method | |
CN202142045U (en) | Touch device and mobile terminal comprising same | |
CN101795139A (en) | Method and circuit for detecting press key | |
JP2013254331A5 (en) | ||
JP2009525538A5 (en) | ||
CN105487809A (en) | Terminal control method and device | |
CN102855033A (en) | Touch control device and control method thereof | |
WO2014101488A1 (en) | Switch triggering error preventing method and device thereof | |
CN102427355A (en) | Touch button state determination method | |
CN204170967U (en) | A kind of rivet sorting unit | |
CN103092480A (en) | Method for quickly returning to list home page and mobile terminal | |
CN103023476A (en) | Response method and control system of capacitive sensing type touch key | |
CN105634502A (en) | Realization method of key scanning based on state machine | |
CN107608811B (en) | Crash detection system based on touch screen and display screen | |
CN105013714A (en) | Battery piece bonding detection method | |
CN102431753A (en) | Compressed garbage truck as well as sliding plate position control method, device and system thereof | |
CN107817919A (en) | A kind of decision method of touch action, device and touch sensor | |
CN101193195A (en) | Key detection processing method | |
CN101741394B (en) | Method and device for detecting key input | |
CN104283542B (en) | Metal panel input control system based on piezoelectric effect and control method thereof | |
CN114198977B (en) | Method for detecting human body approach of refrigerator and refrigerator adopting method | |
CN202177880U (en) | Touch device | |
CN203732639U (en) | Arc fault detection protective device | |
CN201662609U (en) | Key detection circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |