【文件属性】:
文件名称:计算机学院单片机期末试题
文件大小:68KB
文件格式:DOC
更新时间:2014-01-08 10:00:28
期末试题
我们学校老师出的,仅供学习交流
#include
#define uchar unsigned char
void main()
{ uchar kbstatus;
uchar zxb[]={0xc0,0xf9,0xa4,0xb0,
0x99,0x92,0x82,0xf8,0x80,0x88,0xff};
while(1)
{ P0=0xff;
kbstatus=P0&0x0f;
if(kbstatus<0x0a)
P1=zxb[kbstatus];
else P1=zxb[10];
}
}