#include<reg51.h>
#define uint unsigned int
#define uchar unsigned char
ucahr Seg[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
uint aSeg[]={0,0};
void Delay(uint z)
{
uint i,j;
for(i=z;i>0;i--)
for(j=110;j>0;j--);
}
void Time()
{
aSeg[0]++;
if(aSeg[0]>9)
{
aSeg[1]++;
aseg[0]=0;
}
if(aSeg[1]>9)
{
aseg[1]=0;
}
}
void main()
{
uint i,j;
while(1)
{
for(i=0;i<400;i++)
{
for(j=0;j<2;j++)
{
P3=0x01<<j;
P2=Seg[aSeg[j]];
Delay(1);
}
}
Time();
}
}
#define uint unsigned int
#define uchar unsigned char
ucahr Seg[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
uint aSeg[]={0,0};
void Delay(uint z)
{
uint i,j;
for(i=z;i>0;i--)
for(j=110;j>0;j--);
}
void Time()
{
aSeg[0]++;
if(aSeg[0]>9)
{
aSeg[1]++;
aseg[0]=0;
}
if(aSeg[1]>9)
{
aseg[1]=0;
}
}
void main()
{
uint i,j;
while(1)
{
for(i=0;i<400;i++)
{
for(j=0;j<2;j++)
{
P3=0x01<<j;
P2=Seg[aSeg[j]];
Delay(1);
}
}
Time();
}
}