multisim在进行8051模拟,对c代码编译不过去,提示,“reg51.h”no such file or directory. 20
程序代码#include<reg51.h>sbitLED=P0^0;voiddelay(unsignedcharx){unsignedchari,j;for(i=0;i<...
程序代码
#include <reg51.h>
sbit LED = P0^0;
void delay(unsigned char x)
{
unsigned char i,j;
for(i = 0;i < x;i++)
for(j = 0;j < 200;j++);
}
void main(void)
{
While(1)
{
LED = 0;
void delay(100);
LED = 1;
void delay(100);
}
} 展开
#include <reg51.h>
sbit LED = P0^0;
void delay(unsigned char x)
{
unsigned char i,j;
for(i = 0;i < x;i++)
for(j = 0;j < 200;j++);
}
void main(void)
{
While(1)
{
LED = 0;
void delay(100);
LED = 1;
void delay(100);
}
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询