文件名称:jianpan24
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [ASM] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- 赵**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
24键键盘程序,引脚说明及连线
列线:p4.0 p4.1 p4.2 p4.3 作为输入
行线:p4.4 p4.5 p4.6 p4.7 p6.5 p6.6作为输出
1、检测当前是否有键被按下。检测的方法是P4.4-P4.7,P6.5,P6.6输出全"0",读取P4.0-P4.3的状态,若P4.0-P4.3为全"1",则无键闭合,否则有键闭合。
2、去除键抖动。当检测到有键按下后,延时一段时间再做下一步的检测判断。
3、若有键被按下,应识别出是哪一个键闭合。方法是对键盘的行线进行扫描。P4.4-P4.7,P6.5,P6.6按下述6种组合依次输出:
P6.6 111110 P6.5 111101 P4.7 111011 P4.6 110111 P4.5 101111 P4.4 011111
在每组行输出时读取P4.0-P4.3,若全为"1",则表示为"0"这一行没有键闭合,否则有键闭合。
由此得到闭合键的行值和列值,然后可采用计算法或查表法将闭合键的行值和列值转换成所定义的键值。
4、为了保证键每闭合一次CPU仅作一次处理,必须去除键释放时的抖动。- 24-key keyboard program, Pin descr iption and connection
Column line: p4.0 p4.1 p4.2 p4.3 as input
Line line: p4.4 p4.5 p4.6 p4.7 p6.5 p6.6 as output
1, testing whether the current key is pressed. Detection method is to P4.4-P4.7, P6.5, P6.6 output all "0", read the state of P4.0-P4.3, P4.0-P4.3 as if all "1" , no key closure, or a button closure.
2, remove the key jitter. When a key is detected, the delay time to do some testing to determine the next step.
3, if a key is pressed, which should identify a key closed. The line is the keyboard scan lines. P4.4-P4.7, P6.5, P6.6 followed by combination of the following six kinds of output:
P6.6 111110 P6.5 111101 P4.7 111011 P4.6 110111 P4.5 101111 P4.4 011111
To read each line of output, P4.0-P4.3, if all is "1", then "0" key to this line is not closed, or have key closed.
The resultant closure of the row and column key value, and then calculation or look-up table can be closed keys to row and column values into a
列线:p4.0 p4.1 p4.2 p4.3 作为输入
行线:p4.4 p4.5 p4.6 p4.7 p6.5 p6.6作为输出
1、检测当前是否有键被按下。检测的方法是P4.4-P4.7,P6.5,P6.6输出全"0",读取P4.0-P4.3的状态,若P4.0-P4.3为全"1",则无键闭合,否则有键闭合。
2、去除键抖动。当检测到有键按下后,延时一段时间再做下一步的检测判断。
3、若有键被按下,应识别出是哪一个键闭合。方法是对键盘的行线进行扫描。P4.4-P4.7,P6.5,P6.6按下述6种组合依次输出:
P6.6 111110 P6.5 111101 P4.7 111011 P4.6 110111 P4.5 101111 P4.4 011111
在每组行输出时读取P4.0-P4.3,若全为"1",则表示为"0"这一行没有键闭合,否则有键闭合。
由此得到闭合键的行值和列值,然后可采用计算法或查表法将闭合键的行值和列值转换成所定义的键值。
4、为了保证键每闭合一次CPU仅作一次处理,必须去除键释放时的抖动。- 24-key keyboard program, Pin descr iption and connection
Column line: p4.0 p4.1 p4.2 p4.3 as input
Line line: p4.4 p4.5 p4.6 p4.7 p6.5 p6.6 as output
1, testing whether the current key is pressed. Detection method is to P4.4-P4.7, P6.5, P6.6 output all "0", read the state of P4.0-P4.3, P4.0-P4.3 as if all "1" , no key closure, or a button closure.
2, remove the key jitter. When a key is detected, the delay time to do some testing to determine the next step.
3, if a key is pressed, which should identify a key closed. The line is the keyboard scan lines. P4.4-P4.7, P6.5, P6.6 followed by combination of the following six kinds of output:
P6.6 111110 P6.5 111101 P4.7 111011 P4.6 110111 P4.5 101111 P4.4 011111
To read each line of output, P4.0-P4.3, if all is "1", then "0" key to this line is not closed, or have key closed.
The resultant closure of the row and column key value, and then calculation or look-up table can be closed keys to row and column values into a
相关搜索: 查表法
(系统自动生成,下载前可以参看下载内容)
下载文件列表
jianpan24.asm