单片机驱动矩阵按键与独立按键源代码
时间:12-02
来源:互联网
点击:
if(num> P3 = 0xf7;
temp = P3;
temp &= 0xf0;
if(temp != 0xf0)
{
delay(5);
temp = P3;
temp &= 0xf0;
if(temp != 0xf0)
{//按键检测
temp = P3;
fm = 0;
switch(temp)
{
case 0xe7: key = 13 * 13 *13;
break;
case 0xd7: key = 14 * 14 *14;
break;
case 0xb7: key = 15 * 15 *15;
break;
case 0x77: key = 16 * 16 *16;
break;
default:
break;
}
//按键释放
while(temp != 0xf0)
{
temp = P3;
temp &= 0xf0;
}
delay(5);
while(temp != 0xf0)
{
temp = P3;
temp &= 0xf0;
}
fm = 1;
}
}
}
单片机矩阵按键独立按 相关文章:
- 单片机矩阵按键的设计(11-26)
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)