急:大家能不能帮帮我Protues编译时出现ERROR L121: IMPROPER FIXUP怎么办
时间:10-02
整理:3721RD
点击:
程序如下
#include"reg51.h"
#define uint unsigned int
#define uchar unsigned char
sbit P1_0=P1^0;
const tab1[]={0xf0,0x0f0,0xf0,0x0f0,0xf0,0x0f0,
0xaa,0x55,0xaa,0x55,0xaa,0x55,0xff,};
const tab2[]={0xfe,0xfd,0xfd,0xf7,0xef,0xdf,0xbf,0x7f,
0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff,
0xfe,0xfd,0xfd,0xf7,0xef,0xdf,0xbf,0x7f,
0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff,};
uchar a;
void delay()
{
uint i,j;
for(i=0;i<256;i++)
for(j=0;j<256;j++)
{;}
}
void int1()interrupt 0
{ a=a+1;
if(a==1)
{uchar i;
for(i=0;i<14;i++)
{P0=tab1[i];
delay();}
}
if(a==2)
{ uchar i;
for(i=0;i<33;i++)
{ P0=tab2[i];
delay();}
a=0;
}
}
void int2()interrupt 1
{ P1_0=0;
delay();
P1_0=1;
}
void main(void)
{ IE=0x85;
IP=0x04;
TCON=0x00;
a=0;
while(1)
{uchar x;
for(x=0;x<23;x++)
{ P0=-P0;
delay();}
}
}
#include"reg51.h"
#define uint unsigned int
#define uchar unsigned char
sbit P1_0=P1^0;
const tab1[]={0xf0,0x0f0,0xf0,0x0f0,0xf0,0x0f0,
0xaa,0x55,0xaa,0x55,0xaa,0x55,0xff,};
const tab2[]={0xfe,0xfd,0xfd,0xf7,0xef,0xdf,0xbf,0x7f,
0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff,
0xfe,0xfd,0xfd,0xf7,0xef,0xdf,0xbf,0x7f,
0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff,};
uchar a;
void delay()
{
uint i,j;
for(i=0;i<256;i++)
for(j=0;j<256;j++)
{;}
}
void int1()interrupt 0
{ a=a+1;
if(a==1)
{uchar i;
for(i=0;i<14;i++)
{P0=tab1[i];
delay();}
}
if(a==2)
{ uchar i;
for(i=0;i<33;i++)
{ P0=tab2[i];
delay();}
a=0;
}
}
void int2()interrupt 1
{ P1_0=0;
delay();
P1_0=1;
}
void main(void)
{ IE=0x85;
IP=0x04;
TCON=0x00;
a=0;
while(1)
{uchar x;
for(x=0;x<23;x++)
{ P0=-P0;
delay();}
}
}
你看看你的程序,在while里面定义
小编 有没有仿真图啊,,