#include<reg51.h>
sbit LED=p0^0;
void Delay()
{
unsigned char i,j;
for(i=0;i<255;i++)
for(j=0;j<255;j++);
}
void main()
{
while(1)
{
LED=0;
Delay();
LED=1;
Delay();
}
}
為什么我在keil中編譯出現(xiàn)這個錯誤:
正在編繹 Text1.c...
--- 錯誤: 不能執(zhí)行 'C:\Keil\C51\BIN\C51.EXE'
Text1.c - 1 錯誤 (s), 0 警告 (s).
謝謝了,請大家指點
該完后你應該發(fā)現(xiàn)你還有問題,
sbit LED=p0^0;
中的"p"應該是大寫的"P".延時電路有問題,我看過的好象不一樣,參考一下書籍吧!
頂頂
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |