void
time()
{
if((K1num==0)&&(flag3==1))
{write_com(0x80+0x40);
for(i=0;i<9;i++)
write_date(table2[i]);
if(K1==0)
{delay(5);
flag5=1;
if((K1==0)&&(K1num==0))
{K1num=1;
while(!K1)
if(K1num==1)
{TR0=0;
write_com(0x0f);
write_com(0x80+0x40+13);}}}
if((K1==0)&&(K1num==1))
{delay(5);
if(K1==0)
{write_com(0x80+0x40+10);
K1num=1;
while(!K1);
shi++;
if(shi==24)
shi=0;
write_sfm(9,shi);
write_com(0x80+0x40+10);}}
if((K2==0)&&(K1num==1))
{delay(5);
if(K2==0)
{write_com(0x80+0x40+13);
K1num=1;
while(!K2);
fen++;
if(fen==60)
fen=0;
write_sfm(12,fen);
write_com(0x80+0x40+13);}}
if(K1num==1)
{if(K3==0)
{delay(5);
if(K3==0)
{flag5=0;
K1num=0;
while(!K3);
write_com(0x0c);
TR0=1;
flag1=1;
write_com(0x80+0x40+11);
write_date(':');
write_com(0x80+0x40+14);
write_date(' ');
write_com(0x80+0x40+15);
write_date(' '); } } } }
void guangbo ()
if(K3num==0)
{write_com(0x80+0x40);
for(i=0;i<9;i++)
write_date(Al
ARM_00[i]);}
if((K3==0)&&(K3num==0))
{delay(5);
if(K3==0)
{flag1=0;
write_com(0x80+0x40+13);
while(!K3);
K3num=1;
write_com(0x80+0x40);
for(i=0;i<9;i++)
write_date(Alarm_0[i]);
write_sfm(12,fen);
write_sfm(9,shi);
write_com(0x80+0x40+13);
}}}
if((K2==0)&&(K3num==0))
{delay(5);
if(K2==0)
{write_sfm(12,fen1);
write_sfm(9,shi1);
while(!K2);
write_sfm(12,fen);
write_sfm(9,shi);
}}
if((K1==0)&&(K3num==1))
{delay(5);
if(K1==0)
{write_com(0x80+0x40+10);
K3num=1;
while(!K1);
shi++;
if(shi==24)
shi=0;
write_sfm(9,shi1);
write_com(0x80+0x40+10);
if((K2==0)&&(K1num==1))
{delay(5)
if(K2==0)
write_com(0x80+0x40+13);
K1num=1;
while(!K2);
fen++;
if(fen=60)
fen=0;
write_sfm(12,fen1);
write_com(0x80+0x40+13);
if(K1num==1)
{if(K3==0)
delay(5);
if(K3==0)
{flag5=0;
K1num=0;
while(!K3);
write_com(0x0c);
flag1=1;
write_sfm(12,fen);
write_sfm(9,shi);
write_com(0x80+0x40+11);
write_date(':');
write_com(0x80+0x40+14);
write_date(' ');
write_com(0x80=0x40+15);
write_date(' ');}}}}}
一周热门 更多>