一个黄人
获得 3 次赞
帮助过0人
void key_scan() { uchar num; P1=0x3d; temp1=P3; temp1=temp1&0x3b; while(temp1!=0x3b) { delay(5); temp1=P3; while(temp1!=0x3b) { temp1=P3; temp1=temp1&0x3b; switch(temp1) { case 0x39:num=3;break; case 0x35:num=4;break; } } } }