å¯ä»¥çï¼åå¦é®çæ«æç¨åºæ¯
#include<reg51.h>
#define uchar unsigned char
uchar key()
{
//é®çæ«æ
}
main()
{
uchar keycode[2],i=0,x;
uchar a;
while(1)
{
x=key;
if(x<10)
{
keycode[i]=x;
if(i==1)a=keycode[0]*10+keycode[1];
}
i++;
i&=0x01;
}
}
温馨提示:答案为网友推荐,仅供参考