按下按键让液晶显示按键值(51单片机)()lcd1602)

不会弄,真不会,帮我一下!
#include"include.h"
sbit RS=P1^0;
sbit RW=P1^1;
sbit EN=P1^2;
void delayms(uchar ms)
{
uchar i;
while(ms--)
{
for(i=0;i<100;i++);
}
}
uchar read_status()
{
uchar LCD_status;
RS=0;
RW=1;
EN=1;
LCD_status=P1;
EN=0;
return( LCD_status);
}
void write_commond(uchar cmd)
{
void LocateXY(uchar x,uchar y)
{
uchar temp;
temp=x&0x0f;
y&=0x01;
if(y) temp|=0x40;
temp|=0x80;
write_commond(temp);
}
void displchar(uchar x,uchar y,uchar dat)
{
LocateXY(x,y);
write_date(dat);
}
void showstring(uchar x,uchar y,uchar *str)
{
while((read_status()&0x80)==0x80);
RS=0;
RW=0;
EN=1;
P1=cmd;
delayms(1);
EN=0;
}
void write_date(uchar dat)
{
while((read_status()&0x80)==0x80);
RS=1;
RW=0;
EN=1;
P1=dat;
delayms(1);
EN=0;
}
void LCD_rst()
{
write_commond(0x38);
write_commond(0x0c);
write_commond(0x06);
}
void LocateXY(uchar x,uchar y)
{
uchar temp;
temp=x&0x0f;
y&=0x01;
if(y) temp|=0x40;
temp|=0x80;
write_commond(temp);
}
void displchar(uchar x,uchar y,uchar dat)
{
LocateXY(x,y);
write_date(dat);
}
void showstring(uchar x,uchar y,uchar *str)
{
uchar i,n=0;
uchar *temp;
temp=str;
while(*str++!='\0') n++;
if(y==0) write_commond(0x80|x);
if(y==1) write_commond(0xc0|x);//0x40
for(i=0;i<n;i++)
{write_date(temp[i]);
}

}