CN202495916U - Digital circuit capable of eliminating key jittering - Google Patents
Digital circuit capable of eliminating key jittering Download PDFInfo
- Publication number
- CN202495916U CN202495916U CN2011204065774U CN201120406577U CN202495916U CN 202495916 U CN202495916 U CN 202495916U CN 2011204065774 U CN2011204065774 U CN 2011204065774U CN 201120406577 U CN201120406577 U CN 201120406577U CN 202495916 U CN202495916 U CN 202495916U
- Authority
- CN
- China
- Prior art keywords
- output
- gate
- trigger
- dff1
- key
- 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.)
- Expired - Fee Related
Links
- 102100038026 DNA fragmentation factor subunit alpha Human genes 0.000 claims abstract description 22
- 101000950906 Homo sapiens DNA fragmentation factor subunit alpha Proteins 0.000 claims abstract description 22
- 238000005070 sampling Methods 0.000 claims abstract description 11
- 102100029469 WD repeat and HMG-box DNA-binding protein 1 Human genes 0.000 claims abstract description 8
- 101710097421 WD repeat and HMG-box DNA-binding protein 1 Proteins 0.000 claims abstract description 8
- 230000011664 signaling Effects 0.000 claims 4
- 206010044565 Tremor Diseases 0.000 claims 1
- 238000000034 method Methods 0.000 abstract description 4
- 238000002474 experimental method Methods 0.000 abstract description 2
- 230000002265 prevention Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012938 design process Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
Images
Landscapes
- Push-Button Switches (AREA)
Abstract
Description
技术领域 technical field
本实用新型涉及一种消除机械按键抖动的数字电路设计,应用在防抖效果不好的按键上,可以有效的消除抖动。 The utility model relates to a digital circuit design for eliminating vibration of mechanical keys, which is applied to keys with poor anti-shake effect and can effectively eliminate vibration. the
背景技术 Background technique
普通的按键不具备防抖动,手按一次可以产生多次输入,这种情况在实际生活当中经常遇到。比如学生使用的EDA实验箱中的按键,该按键弹力很小,按一次抖动很严重。有的解决方法是按键之后延长按键作用时间,使在延长按键时间内的按键抖动无效。但这种方法缺点是如果延长按键时间设置过长,两次短时间内按键会误认为一次。在实际产品中使用弹性很好的按键防止抖动,比如手机按键。 Ordinary buttons do not have anti-shake, and one hand press can generate multiple inputs, which is often encountered in real life. For example, the buttons in the EDA experiment box used by students have very little elasticity, and the vibration is very serious when pressed once. Some solutions are to prolong the action time of the key after pressing the key, so that the vibration of the key during the extended key time is invalid. But the disadvantage of this method is that if the extended key-press time is set too long, two key-presses in a short period of time will be mistaken for one. Use buttons with good elasticity to prevent shaking in actual products, such as mobile phone buttons. the
发明内容 Contents of the invention
机械性能差的开关,按动一次可能产生多次按键的效果。本实用新型提供一种数字电路,该电路能消除按键抖动,使按一次键只产生一个有效信号。 A switch with poor mechanical properties may produce the effect of pressing multiple keys once. The utility model provides a digital circuit, which can eliminate key vibration, so that only one effective signal can be generated by pressing a key once. the
本实用新型解决其技术问题所采用的技术方案是:一种消除按键抖动的数字电路,包括与门、或门和D触发器,采样时钟CLK连接触发器DFF0和DFF1的时钟输入端,按键信号X连接触发器DFF0的输入端D0,或门OR的输出连接触发器DFF1输入端D1,触发器DFF1的输出Q1是按键信号经过防抖处理之后的输出。 The technical solution adopted by the utility model to solve the technical problem is: a digital circuit for eliminating button jitter, including AND gate, OR gate and D flip-flop, the sampling clock CLK is connected to the clock input terminals of flip-flops DFF0 and DFF1, and the button signal X is connected to the input terminal D 0 of the flip-flop DFF0, and the output of the OR gate OR is connected to the input terminal D 1 of the flip-flop DFF1. The output Q 1 of the flip-flop DFF1 is the output of the key signal after anti-shake processing.
在连续采样信号下读取按键信息;如果两个(及以上)相邻采样的按键信号都为按下,则判定按键按下,否则判定按键处于抖动状态;如果两个(及以上) 相邻采样的按键信号都为抬起,则判定按键抬起,否则判定按键处于抖动状态;将前述两个步骤中判定按键按下、抬起的信号分别作为有效按键信号送入接收按键动作的元件,实现消除按键抖动。 Read button information under continuous sampling signals; if two (and above) adjacent sampled button signals are both pressed, it is determined that the button is pressed, otherwise it is determined that the button is in a shaking state; if two (and more) adjacent If the sampled key signals are all lifted, it is determined that the key is lifted, otherwise it is determined that the key is in a shaking state; the signals for determining that the key is pressed and lifted in the above two steps are respectively sent to the component that receives the key action as a valid key signal, Realize the elimination of button jitter. the
设计过程如下:设X为按键输入,Y为输出。CLK为按键的采样时钟。 The design process is as follows: Let X be the key input, and Y be the output. CLK is the sampling clock of the button. the
状态转换图如图2所示,S0输入一直为0,代表取样信号连续取样两次0,此时认定它已经稳定地放掉按钮;S1输入一个1,代表手按的时间不够长,认为按键无效;S2输入两个1,代表取样信号连续取样两次1,此时认定它已经稳定地按下按钮;S3输入由1抖动为0,代表手在抖动。总之,必须连续取样两次1才会输出1,两次0才会输出0。 The state transition diagram is shown in Figure 2. The input of S 0 is always 0, which means that the sampling signal has been sampled 0 twice in a row. At this time, it is considered that it has released the button stably; the input of S 1 is 1, which means that the time of pressing is not long enough. It is considered that the button is invalid; S 2 inputs two 1s, which means that the sampling signal has been sampled twice 1 continuously, and at this time it is considered that the button has been pressed steadily; the input of S 3 is shaking from 1 to 0, which means that the hand is shaking. In short, it is necessary to sample two consecutive 1s to output 1, and two 0s to output 0.
编码方案:S0为00,S1为01,S2为11,S3为10。画出表示次态逻辑函数和进位函数的卡诺图(如表1)。 Coding scheme: S 0 is 00, S 1 is 01, S 2 is 11, S 3 is 10. Draw a Karnaugh map representing the next-state logic function and carry function (as shown in Table 1).
表1次态/输出 的卡诺图 Table 1 Secondary state/output Karnaugh map
从卡诺图得到电路的状态方程和输出方程为: The state equation and output equation of the circuit obtained from the Karnaugh map are:
Q0 n+1=X Q 0 n+1 =X
Y=Q1 Y=Q 1
用D触发器实现,根据状态方程和输出方程得到防抖电路图,如图1所示。按键信号X和触发器DFF1输出端Q1连接与门AND1,按键信号X和触发器DFF0输出端Q0连接与门AND2,两个触发器的输出端Q0和Q1连接与门AND3;与门AND1、AND2和AND3的输出端连接或门OR。采样时钟CLK连接触发器DFF0和DFF1的时钟输入端,按键信号X连接触发器DFF0的输入端D0, 或门OR的输出连接触发器DFF1输入端D1,触发器DFF1的输出Q1是按键信号经过防抖处理之后的输出。 It is realized with D flip-flop, and the anti-shake circuit diagram is obtained according to the state equation and the output equation, as shown in Figure 1. The key signal X and the output terminal Q1 of the trigger DFF1 are connected to the AND gate AND1, the key signal X and the output terminal Q0 of the trigger DFF0 are connected to the AND gate AND2, and the output terminals Q0 and Q1 of the two flip-flops are connected to the AND gate AND3; The output terminals of the gates AND1, AND2 and AND3 are connected with the OR gate OR. The sampling clock CLK is connected to the clock input terminals of flip-flops DFF0 and DFF1, the key signal X is connected to the input terminal D 0 of the flip-flop DFF0, the output of the OR gate OR is connected to the input terminal D 1 of the flip-flop DFF1, and the output Q 1 of the flip-flop DFF1 is the button The output of the signal after anti-shake processing.
本实用新型的有益效果是,按键一次就会产生一次输入信号,不会产生多次输入,保证真实反映人按键时的按键次数。 The beneficial effect of the utility model is that one input signal will be generated once a key is pressed, and multiple inputs will not be generated, so as to ensure that the number of times a person presses a key is truly reflected. the
附图说明 Description of drawings
下面结合附图和实施例对本实用新型进一步说明。 Below in conjunction with accompanying drawing and embodiment the utility model is further described. the
图1为本实用新型的数字电路图; Fig. 1 is the digital circuit diagram of the present utility model;
图2为状态转换图。 Figure 2 is a state transition diagram. the
具体实施方式 Detailed ways
下面结合附图和具体实施例对本实用新型作进一步说明,但不作为对本实用新型的限定。 The utility model will be further described below in conjunction with the accompanying drawings and specific embodiments, but not as a limitation of the utility model. the
实施例1:一种消除按键抖动的数字电路,如图1所示,包括与门、或门和D触发器,采样时钟CLK连接触发器DFF0和DFF1的时钟输入端,按键信号X连接触发器DFF0的输入端D0,或门OR的输出连接触发器DFF1输入端D1,触发器DFF1的输出Q1是按键信号经过防抖处理之后的输出。 Embodiment 1: A kind of digital circuit that eliminates key jitter, as shown in Figure 1, comprises AND gate, OR gate and D flip-flop, the sampling clock CLK connects the clock input end of flip-flop DFF0 and DFF1, and key signal X connects flip-flop The input terminal D 0 of DFF0 and the output of the OR gate OR are connected to the input terminal D 1 of the flip-flop DFF1 , and the output Q 1 of the flip-flop DFF1 is the output of the key signal after anti-shake processing.
实施例2:按键信号X和触发器DFF1输出端Q1连接与门AND1,按键信号X和触发器DFF0输出端Q0连接与门AND2,两个触发器的输出端Q0和Q1连接与门AND3;与门AND1、AND2和AND3的输出端连接或门OR。采样时钟CLK频率范围64~4KHz,采样时钟CLK连接触发器DFF0和DFF1的时钟输入端。按键信号X连接触发器DFF0的输入端D0,或门OR的输出连接触发器DFF1输入端D1,触发器DFF1的输出Q1是按键信号经过防抖处理之后的输出。 Embodiment 2: The button signal X and the output terminal Q1 of the flip-flop DFF1 are connected to the AND gate AND1, the button signal X and the output terminal Q0 of the flip-flop DFF0 are connected to the AND gate AND2, and the output terminals Q0 and Q1 of the two flip-flops are connected to the AND gate. Gate AND3; the output terminals of AND gates AND1, AND2 and AND3 are connected with OR gate OR. The frequency range of the sampling clock CLK is 64-4KHz, and the sampling clock CLK is connected to the clock input terminals of the flip-flops DFF0 and DFF1. The key signal X is connected to the input terminal D 0 of the flip-flop DFF0, the output of the OR gate OR is connected to the input terminal D 1 of the flip-flop DFF1, and the output Q 1 of the flip-flop DFF1 is the output of the key signal after anti-shake processing.
以上所述的实施例,只是本实用新型具体实施方式的两种,本领域的技术人 员在本实用新型技术方案范围内进行的通常变化和替换都应包含在本实用新型的保护范围内。 The above-mentioned embodiments are only two kinds of specific implementation methods of the utility model, and the usual changes and replacements carried out by those skilled in the art within the scope of the technical solution of the utility model all should be included in the protection scope of the utility model. the
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011204065774U CN202495916U (en) | 2011-10-20 | 2011-10-20 | Digital circuit capable of eliminating key jittering |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011204065774U CN202495916U (en) | 2011-10-20 | 2011-10-20 | Digital circuit capable of eliminating key jittering |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN202495916U true CN202495916U (en) | 2012-10-17 |
Family
ID=47002128
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2011204065774U Expired - Fee Related CN202495916U (en) | 2011-10-20 | 2011-10-20 | Digital circuit capable of eliminating key jittering |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN202495916U (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104092454A (en) * | 2014-06-23 | 2014-10-08 | 西安电子工程研究所 | Key dithering removal method based on logic gate circuit |
-
2011
- 2011-10-20 CN CN2011204065774U patent/CN202495916U/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104092454A (en) * | 2014-06-23 | 2014-10-08 | 西安电子工程研究所 | Key dithering removal method based on logic gate circuit |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103733520B (en) | Multi-clock real-time counter | |
| ATE486409T1 (en) | EVENT-DRIVEN DYNAMIC LOGIC FOR REDUCED POWER CONSUMPTION | |
| CN102684646A (en) | Single-edge master-slave D trigger | |
| CN101917194B (en) | Double-edge triggering high-speed digital-to-analog converter | |
| ATE427584T1 (en) | HIGH PERFORMANCE DOUBLE GATE FLIP-FLOP | |
| CN103208980A (en) | Window voltage comparison device | |
| CN107209481B (en) | Time register | |
| CN202495916U (en) | Digital circuit capable of eliminating key jittering | |
| GB0702588D0 (en) | Mixer with shorting switch | |
| TW200601699A (en) | Latch circuit | |
| WO2002069499A3 (en) | Divide-by-three circuit | |
| ES8507743A1 (en) | Debounce circuit providing synchronously clocked digital signals. | |
| CN109525222B (en) | A single-phase clock double-edge D flip-flop | |
| CN101056164B (en) | A synchronization device across asynchronization clock domain signals | |
| CN201251769Y (en) | Device capable of locking keystroke | |
| US6621319B1 (en) | Edge-triggered toggle flip-flop circuit | |
| CN101436853A (en) | Apparatus and method for reducing input noise | |
| CN210986064U (en) | T trigger circuit with asynchronous reset | |
| CN104917517B (en) | For realize low-power consumption, Wide measuring range time-to-digit converter energy-saving circuit | |
| CN104333373B (en) | A kind of T triggers and the frequency divider using the T triggers | |
| TW200520382A (en) | Dynamic logic return-to-zero latching mechanism | |
| CN202886025U (en) | Intelligent pressure transmitter | |
| CN202076992U (en) | D flip-flop | |
| CN201774516U (en) | Double-edge triggering high-speed digital-to-analog converter | |
| CN204905151U (en) | A magnetic switch device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20121017 Termination date: 20131020 |
