#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar num;
uchar i,j,k;
uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
void main()
{
TMOD=0x01;
TH0=(65536-45872)/256;
TL0=(65536-45872)%256;
EA=1;
ET0=1;
TR0=1;
i=0;
while(1)
{
if(num==20)
{
num=0;
i++;
j=i%10;
k=i/10;
P1=table[j];
P3=table[k];
}
}
}
void T0_
time()interrupt 3
{
num=0;
TH0=(65536-45872)/256;
TL0=(65536-45872)%256;
num++;
}
{
TH0=(65536-45872)/256;
TL0=(65536-45872)%256;
num++;
}
一周热门 更多>