#include<reg51.h>
#include<absacc.h>
sbit XIAOSHI_0=P3^0;
sbit XIAOSHI_1=P3^1;
sbit FEN_0=P3^2;
sbit FEN_1=P3^3;
sbit setd=P3^4;
sbit movd=P3^5;
void XIANSHI();
void TJ_FEN();
void TJ_XIAOSHI();
void main(void)
{
unsigned char i;
i=0;
SP=0x70[s:9]1=0xff[s:9]3=0xff;
DBYTE[0x6f]=0;DBYTE[0x6e]=0;
DBYTE[0x6d]=0;DBYTE[0x6C]=0;
TH0=0x3c;TL0=0xaf;
ET0=1;EA=1;TR0=1;
while(1)
{
while(setd==0)
{
i++;TR0=0; while(setd==0);
}
XIANSHI()
if (i=1)
TJ_XIANSHI();
else if (i=2)
TJ_FEN();
}
}
void timer0() interrupt 1
{
unsigned char j,w;
j++;
while(j==20)
{
j=0;
DBYTE[0x6f]++;
if (DBYTE[0x6f]==10)
{DBYTE[0x6f]=0;DBYTE[0x6e]++;}
else if (DBYTE[0x6e]==6)
{DBYTE[0x6e]=0;DBYTE[0x6d]++;while((DBYTE[0x6c]*10+DBYTE[0x6d])>=24){DBYTE[0x6c]=0;DBYTE[0x6d]=0;}
else if (DBYTE[0x6d]==10)
{DBYTE[0x6d]=0;DBYTE[0x6c]++;}
TH0=0x3c;TL0=0xaf;
}
}
void XIANSHI()
{
unsigned char p;
p=DBYTE[0x6c];
XIAOSHI_0=0;
P1=SHUZI[p];
XIAOSHI_0=1;
p=DBYTE[0x6d];
XIAOSHI_1=0;
P1=SHUZI[p]
XIAOSHI_1=1;
p=DBYTE[0x6e];
FEN_0=0;
P1=SHUZI[p];
FEN_0=1;
p=DBYTE[0x6f];
FEN_1=0;
P1=SHUZI[p];
FEN_1=1;
}
unsigned char code SHUZI[10]={0x05,0xdd,0x46,0x54,0x9c,0x34,0x24,0x5d,0x04,0x14}
void TJ_FEN()
{}
void TJ_XIAOSHI()
{}
问题我在第一个if处出错,我现在可找不出错在哪!
时段 | 个数 |
---|---|
{{f.startingTime}}点 - {{f.endTime}}点 | {{f.fileCount}} |