P3=0xfe;
temp=P3;
temp=temp&0xf0;
while(temp!=0xf0)
{delay(5);
temp=P3;
while(keyscan())
{write_date(0x30+keyscan());
while(1);
dgahz 發(fā)表于 2014-11-20 23:21
while(temp!=0xf0)這一句如果temp!=0xf0成立的話,程序會不會死在這里?也就是說有按鍵按下,程序停在這 ...
dgahz 發(fā)表于 2014-11-20 23:32
程序又死在這了,應(yīng)該搞個大循環(huán)啊
dgahz 發(fā)表于 2014-11-21 19:43
不好意思,我搞錯了,把while函數(shù)體忘了,條件滿足是要執(zhí)行函數(shù)體的。主程序搞個大循環(huán)沒發(fā)現(xiàn)你說的兩個1. ...
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |