文件名称:CodeSwitch-
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 805kb
- 下载次数:
- 0次
- 提 供 者:
- 赵**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
本代码为编码开关代码,编码开关也就是数字音响中的
360度旋转的数字音量以及显示器上用的(单键飞梭开
关)等类似鼠标滚轮的手动计数输入设备。
我使用的编码开关为5个引脚的,其中2个引脚为按下
转轮开关(也就相当于鼠标中键)。另外3个引脚用来
检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c
b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉
电阻,并且a,c需要分别对地接一个104的电容,否则
因为编码开关的触点抖动会引起轻微误动作。本程序不
使用定时器,不占用中断,不使用延时代码,并对每个
细分步数进行判断,避免一切误动作,性能超级稳定。
我使用的编码器是APLS的EC11B可以参照附件的时序图
编码器控制流水灯最能说明问题,下面是以一段流水
灯来演示。-This code for code switch code, coding switch is the digital audio
360 degrees of rotation digital volume and displays use on the open list key shuttle (
Closed) and similar mouse wheel manual count input device.
I use a code switch for five of the pins, with two pins for press
The runner switch (also is equivalent to the middle mouse button). Three other pins are used to
The rotation direction detection and rotation of the number of detection. Pins are respectively for a, b, c
B, c received a ground respectively P2.0 and P2.1 mouth and take two 10 K respectively on pull
Resistance, and a, c need to pick up a respectively in 104, otherwise the capacitance
Because of the code switch contacts jitter can cause minor wrong action. This procedure does not
Use timer, do not take up interrupt, do not use delay, and each code
Segment for judgment, avoid steps all misoperation, super stable performance.
I use of APLS is encoder EC11B can refer to the attachment sequence chart
Encode
360度旋转的数字音量以及显示器上用的(单键飞梭开
关)等类似鼠标滚轮的手动计数输入设备。
我使用的编码开关为5个引脚的,其中2个引脚为按下
转轮开关(也就相当于鼠标中键)。另外3个引脚用来
检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c
b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉
电阻,并且a,c需要分别对地接一个104的电容,否则
因为编码开关的触点抖动会引起轻微误动作。本程序不
使用定时器,不占用中断,不使用延时代码,并对每个
细分步数进行判断,避免一切误动作,性能超级稳定。
我使用的编码器是APLS的EC11B可以参照附件的时序图
编码器控制流水灯最能说明问题,下面是以一段流水
灯来演示。-This code for code switch code, coding switch is the digital audio
360 degrees of rotation digital volume and displays use on the open list key shuttle (
Closed) and similar mouse wheel manual count input device.
I use a code switch for five of the pins, with two pins for press
The runner switch (also is equivalent to the middle mouse button). Three other pins are used to
The rotation direction detection and rotation of the number of detection. Pins are respectively for a, b, c
B, c received a ground respectively P2.0 and P2.1 mouth and take two 10 K respectively on pull
Resistance, and a, c need to pick up a respectively in 104, otherwise the capacitance
Because of the code switch contacts jitter can cause minor wrong action. This procedure does not
Use timer, do not take up interrupt, do not use delay, and each code
Segment for judgment, avoid steps all misoperation, super stable performance.
I use of APLS is encoder EC11B can refer to the attachment sequence chart
Encode
(系统自动生成,下载前可以参看下载内容)
下载文件列表
编码开关\EC11编码开关.pdf
........\STARTUP.A51
........\STARTUP.LST
........\STARTUP.OBJ
........\开关
........\开关.hex
........\开关.lnp
........\开关.M51
........\开关.Opt
........\开关.plg
........\开关.Uv2
........\开关_Opt.Bak
........\开关_Uv2.Bak
........\编码器代码.c
........\编码器代码.LST
........\编码器代码.OBJ
编码开关
........\STARTUP.A51
........\STARTUP.LST
........\STARTUP.OBJ
........\开关
........\开关.hex
........\开关.lnp
........\开关.M51
........\开关.Opt
........\开关.plg
........\开关.Uv2
........\开关_Opt.Bak
........\开关_Uv2.Bak
........\编码器代码.c
........\编码器代码.LST
........\编码器代码.OBJ
编码开关