#define uChar unsigned char
#define uInt unsigned int
uChar a []={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
uChar b []={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
uChar second=00,minute=00,hour=10,year=17,month=01,day=11,count;
sbit Key1 = P3^7; //计时停止
sbit Key2 = P3^6;//调位
sbit Key3 = P3^0;//加一
sbit Key4 = P3^2; //切换
sbit LED1 = P1^7;
void Delayms(uInt t)
{
uInt i,j;
for(i=0;ifor(j=0;j<125;j++)
;
}
void Dispaly1(uChar second,uChar minute,uChar hour)
{
P2=b[0];
P0=a[hour/10];
Delayms(5);
P2=b[1];
P0=a[hour%10];
Delayms(5);
P2=b[2];
P0=0x40;
Delayms(5);
P2=b[3];
P0=a[minute/10];<