文件名称:bianmakaiguan
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 788kb
- 下载次数:
- 0次
- 提 供 者:
- 李*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
本代码为编码开关代码,编码开关也就是数字音响中的
360度旋转的数字音量以及显示器上用的(单键飞梭开
关)等类似鼠标滚轮的手动计数输入设备。
我使用的编码开关为5个引脚的,其中2个引脚为按下
转轮开关(也就相当于鼠标中键)。另外3个引脚用来
检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c
b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉
电阻,并且a,c需要分别对地接一个104的电容,否则
因为编码开关的触点抖动会引起轻微误动作。本程序不
使用定时器,不占用中断,不使用延时代码,并对每个
细分步数进行判断,避免一切误动作,性能超级稳定。
我使用的编码器是APLS的EC11B可以参照附件的时序图
编码器控制流水灯最能说明问题,下面是以一段流水
灯来演示。-Code for encoding the switch code, coding switch is in the digital audio
The number of 360-degree rotating display with the volume, as well as the (one-touch open Shuttle
Clearance) and similar to manually count the mouse wheel input device.
I use the code switch for the 5-pin, 2 pin for which the press
Rotary switch (it is equivalent to middle mouse button). In addition to 3-pin
Detection of rotation direction and rotation end detection step. Pin, respectively, for a, b, c
b grounding a, c, respectively, from P2.0 and P2.1, respectively, then the mouth and pull the two 10K
Resistance, and a, c, respectively, of the need to take a capacitance 104, or
Because the coding of the contact switch will cause a slight jitter malfunction. This procedure does not
The use of timers, interrupt off, do not use delay code, and each
Determine the number of sub-step, to avoid all the wrong moves, super stable performance.
I use the encoder is the APLS can refer to the annex EC11B
360度旋转的数字音量以及显示器上用的(单键飞梭开
关)等类似鼠标滚轮的手动计数输入设备。
我使用的编码开关为5个引脚的,其中2个引脚为按下
转轮开关(也就相当于鼠标中键)。另外3个引脚用来
检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c
b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉
电阻,并且a,c需要分别对地接一个104的电容,否则
因为编码开关的触点抖动会引起轻微误动作。本程序不
使用定时器,不占用中断,不使用延时代码,并对每个
细分步数进行判断,避免一切误动作,性能超级稳定。
我使用的编码器是APLS的EC11B可以参照附件的时序图
编码器控制流水灯最能说明问题,下面是以一段流水
灯来演示。-Code for encoding the switch code, coding switch is in the digital audio
The number of 360-degree rotating display with the volume, as well as the (one-touch open Shuttle
Clearance) and similar to manually count the mouse wheel input device.
I use the code switch for the 5-pin, 2 pin for which the press
Rotary switch (it is equivalent to middle mouse button). In addition to 3-pin
Detection of rotation direction and rotation end detection step. Pin, respectively, for a, b, c
b grounding a, c, respectively, from P2.0 and P2.1, respectively, then the mouth and pull the two 10K
Resistance, and a, c, respectively, of the need to take a capacitance 104, or
Because the coding of the contact switch will cause a slight jitter malfunction. This procedure does not
The use of timers, interrupt off, do not use delay code, and each
Determine the number of sub-step, to avoid all the wrong moves, super stable performance.
I use the encoder is the APLS can refer to the annex EC11B
相关搜索: 编码器
(系统自动生成,下载前可以参看下载内容)
下载文件列表
编码开关
........\EC11编码开关.pdf
........\编码器代码.c
........\EC11编码开关.pdf
........\编码器代码.c