The method, the invention discloses a remote control button repetitive control includes the steps of: A: when a button, the remote control decoding in falling edge triggered interrupt (A) decoding key code for the key judgment and repeat the previous code key to step B; B: determine the key variable count (M) of the values are between 2 to 5, if it is, then discard the key, return to step a; otherwise, go to step C; C: the key code value assigned to the variable (D), remote control code and call timer interrupt variable (B), determine the interval variable (E) is greater than the constant (G), if is the remote control code variable (D) into the buffer, and the variable interval (E) and the key variables (M) count is reset; otherwise, discarding the code key. The invention is characterized in that the remote control of the remote control device is used to overcome the need of repeated key \time delay\ in the key operation process, thereby overcoming the remote controller to be too sensitive, and also more convenient for users to use.
【技术实现步骤摘要】
本专利技术涉及通讯
,尤其涉及。
技术介绍
随着人民生活水平的提高,日新月异的新技术涌入现代每个家庭中,电视、空调、DVD等家用电器得到普遍应用。这些家电大多采用遥控器操作控制,但现有的遥控器按键重复功能一般都是匀速重复,当按着按键时,有时会因按键时间过长,重复速度过快,而感觉太“敏感”,不利于用户对按键的操作控制。
技术实现思路
本专利技术要解决的技术问题是提供。为解决上述技术问题,本专利技术的目的是通过以下技术方案实现的。,包括步骤a当有按键时,通过遥控解码中下降沿触发中断(A)解码判断码键为方向键且为重复前一码键,则进入步骤b;b判断按键计数变量(M)的值是否在2到5之间,如果是,则丢弃码键,返回步骤a;否则,进入步骤c;c将按键码值赋给遥控码变量(D),并调用定时器中断变量(B),判断间隔变量(E)是否大于常量(G),如果是,则将遥控码变量(D)送入缓冲区,并将间隔变量(E)与按键计数变量(M)清零;否则,丢弃码键。其中,步骤a中若遥控解码中下降沿触发中断(A)解码判断码键为其它码键时且为重复前一码键,则将间隔变量(E)清零,并进入步骤b;否则,直接进入步骤b。其中,步骤a与步骤b之间还包括当按键按动一次,按键计数变量(M)加1。其中,步骤c中每调用一次定时器中断变量(B),间隔变量(E)加1。以上技术方案可以看出,本专利技术具有以下有益效果本专利技术中通过在按键操作过程中对需要重复的按键“延时”重复,从而克服遥控器过于灵敏,同时也更方便用户的使用。附图说明图1为本专利技术方法流程图。具体实施例方式本专利技术中遥控器遥控解码占用2个中断,一个 ...
【技术保护点】
一种遥控按键重复控制的方法,其特征在于,包括步骤: a:当有按键时,通过遥控解码中下降沿触发中断(A)解码判断码键为方向键且为重复前一码键,则进入步骤b; b:判断按键计数变量(M)的值是否在2到5之间,如果是,则丢弃码键,返回步骤a;否则,进入步骤c; c:将按键码值赋给遥控码变量(D),并调用定时器中断变量(B),判断间隔变量(E)是否大于常量(G),如果是,则将遥控码变量(D)送入缓冲区,并将间隔变量(E)与按键计数变量(M)清零;否则,丢弃码键。
【技术特征摘要】
【专利技术属性】
技术研发人员:蔡伯权,
申请(专利权)人:康佳集团股份有限公司,
类型:发明
国别省市:94[中国|深圳]
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。