摘要
基于解决微机中键盘在部分按键需要进行连击处理、按键去抖时CPU执行效率低等问题的目的,采用逐行扫描法对键盘按键识别,根据按键键值确定哪些按键需要连击处理,连击时是连续执行某一功能还是执行第二功能,同时使用定时器中断解决延时去抖和对按键闭合时间的判断,经过在多个项目中的实际应用,得出用这种方法不但可以快速有效地处理按键功能,而且利用定时中断提高了CPU的执行效率的结论。
Based on part key need combo processing in computer keyboard, CPU execution efficiency low when keys to shake, using line by line scan method to identify keys, according the key values to determine which keys need combo processing, this key is continuous to perform the first function or perform the second function, at this time using timer interrupt to solve delay to shake and the button closing time, through the practical application of some projects, this way can not only effectively deal with keys function, but improve the execution efficiency of CPU by timer interrupt.
出处
《电子设计工程》
2011年第17期34-36,共3页
Electronic Design Engineering
作者简介
鲁庆宾(1971-),男,河南南阳人,硕士,讲师。研究方向:嵌入式系统。