2x2行列式键盘扫描程序
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
delay1(100);
feng=1;
break;
case 0xeb:
led4=~led4;
feng=0;
delay1(100);
feng=1;
break;
}
while(templ!=0xf0)
{
templ=P3;
templ=templ&0xf0;
}
}
}
P3=0xfe;
templ=P3;
templ=templ&0xf0;
templ=P3;
templ=templ&0xf0;
while(templ!=0xf0)
{
delay1(10);
templ=P3;
templ=templ&0xf0;
while(templ!=0xf0)
{
templ=P3;
switch(templ)
{
case 0xbb:
led6=~led6;
feng=0;
case 0xee:
led2=~led2;
feng=0;
delay1(100);
feng=1;
break;
}
while(templ!=0xf0)
{
templ=P3;
templ=templ&0xf0;
}
}
}
}
}
while(templ!=0xf0)
{
பைடு நூலகம்delay1(10);
templ=P3;
templ=templ&0xf0;
while(templ!=0xf0)
{
templ=P3;
switch(templ)
{
case 0xbe:
led8=~led8;
feng=0;
delay1(100);
feng=1;
break;
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit rs=P3^5;
sbit dula=P2^6;
sbit wela=P2^7;
sbit led2=P1^1;
sbit led4=P1^3;
sbit led6=P1^5;
sbit led8=P1^7;
sbit feng=P2^3;
uchar templ;
void delay1(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void main()
{
dula=1;
P0=0;
dula=0;
while(1)
{
P3=0xfb;
feng=1;
break;
case 0xeb:
led4=~led4;
feng=0;
delay1(100);
feng=1;
break;
}
while(templ!=0xf0)
{
templ=P3;
templ=templ&0xf0;
}
}
}
P3=0xfe;
templ=P3;
templ=templ&0xf0;
templ=P3;
templ=templ&0xf0;
while(templ!=0xf0)
{
delay1(10);
templ=P3;
templ=templ&0xf0;
while(templ!=0xf0)
{
templ=P3;
switch(templ)
{
case 0xbb:
led6=~led6;
feng=0;
case 0xee:
led2=~led2;
feng=0;
delay1(100);
feng=1;
break;
}
while(templ!=0xf0)
{
templ=P3;
templ=templ&0xf0;
}
}
}
}
}
while(templ!=0xf0)
{
பைடு நூலகம்delay1(10);
templ=P3;
templ=templ&0xf0;
while(templ!=0xf0)
{
templ=P3;
switch(templ)
{
case 0xbe:
led8=~led8;
feng=0;
delay1(100);
feng=1;
break;
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit rs=P3^5;
sbit dula=P2^6;
sbit wela=P2^7;
sbit led2=P1^1;
sbit led4=P1^3;
sbit led6=P1^5;
sbit led8=P1^7;
sbit feng=P2^3;
uchar templ;
void delay1(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void main()
{
dula=1;
P0=0;
dula=0;
while(1)
{
P3=0xfb;