# include < reg52.h >
# include < 24C02.h>
# define uint unsigned int
# define uchar unsigned char
sbit rs = P3^5; //定义lcd1602的rs端
sbit lcden = P3^4;//定义lcd1602的lcden端口
sbit s1 = P3^0;//定义功能键s1
sbit s2 = P3^1;//定义功能键s2
sbit s3 = P3^2;//定义功能键s3
sbit beep = P2^3;//定义蜂鸣器
uchar count, s1num;
char miao,fen,shi;
uchar code table[] = "Designer:X_ZL ";//定义初始上电时液晶默认显示状态
void delay_ms( xms ) //定义延时函数
{
uint i,j;
for( i = xms ; i > 0 ; i --)
for( j = 110 ; j > 0 ; j --);
}