[qq]946173647[/qq] #include<reg52.h>
sbit ADDR0 = P1^0;
sbit ADDR1 = P1^1;
sbit ADDR2 = P1^2;
sbit ADDR3 = P1^3;
sbit ENLED = P1^4;
sbit KEY_IN_4 = P2^7;
sbit KEY_IN_3 = P2^6;
sbit KEY_IN_2 = P2^5;
sbit KEY_IN_1 = P2^4;
sbit KEY_OUT_1 = P2^3;
sbit KEY_OUT_2 = P2^2;
sbit KEY_OUT_3 = P2^1;
sbit KEY_OUT_4 = P2^0;
unsigned char KeySta[4][4]={ {1,1,1,1},
|