该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
{
miao=0;
}
write_sfm(9,miao);
write_add(1,miao);
write_com(0x80+0x49);
}
if(num==2)
{
fen++;
if(fen==60)
{
fen=0;
}
write_sfm(6,fen);
write_add(5,fen);
write_com(0x80+0x46);
}
if(num==3)
{
shi++;
if(shi==24)
{
shi=0;
}
write_sfm(3,shi);
write_add(9,shi);
write_com(0x80+0x43);
}
}
}
if(s3==0)
{
delay(10);
if(s3==0)
{
while(!s3);
delay(10);
if(num==1)
{
miao--;
if(miao==255)
{
miao=59;
}
write_sfm(9,miao);
write_add(1,miao);
write_com(0x80+0x49);
}
if(num==2)
{
fen--;
if(fen==255)
{
fen=59;
}
write_sfm(6,fen);
write_add(5,fen);
write_com(0x80+0x46);
}
if(num==3)
{
shi--;
if(shi==255)
{
shi=23;
}
write_sfm(3,shi);
write_add(9,shi);
write_com(0x80+0x43);
}
}
}
}
}
void main()
{
init_all();
while(1)
{
key_scan();
}
}
void timer_0() interrupt 1
{
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
tt++;
if(tt==20)
{
tt=0;
miao++;
if(miao==60)
{
miao=0;
fen++;
if(fen==60)
{
fen=0;
shi++;
if(shi==24)
{
shi=0;
}
}
}
write_add(1,miao);
write_sfm(9,miao);
write_add(5,fen);