#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)這個(gè)錯(cuò)誤:
正在編繹 Text1.c...
--- 錯(cuò)誤: 不能執(zhí)行 'C:\Keil\C51\BIN\C51.EXE'
Text1.c - 1 錯(cuò)誤 (s), 0 警告 (s).
謝謝了,請(qǐng)大家指點(diǎn)
該完后你應(yīng)該發(fā)現(xiàn)你還有問(wèn)題,
sbit LED=p0^0;
中的"p"應(yīng)該是大寫(xiě)的"P".延時(shí)電路有問(wèn)題,我看過(guò)的好象不一樣,參考一下書(shū)籍吧!
頂頂
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |