uchar keycode[16]={
0xee,0xde,0xbe,0x7e,
0xed,0xdd,0xbd,0x7d,
0xeb,0xdb,0xbb,0x7b,
0xe7,0xd7,0xb7,0x77,
};//矩阵键盘按键码
unsigned char key_done()
{
unsigned char row,col,i,k=16;
flag=0;
P4DIR=0xf0;
P4OUT=0x0f;
if((P4IN&0x0f)!= 0x0f)
{
delay1ms(5);
if((P4IN&0x0f)!= 0x0f)
{
col=P4IN&0x0f;
P4DIR=0x0f;
P4OUT=0xf0;
row=P4IN&0xf0;
for(i=0; i