你接到單片機的哪個腳?程序是什么?
#include<reg52.h>
main()
{
原理圖.rar
(84.76 KB, 下載次數(shù): 22)
P1=0x55; //P1口初始值
EA=1; //全局中斷開
EX0=1; //外部中斷0開
IT0=0; //電平觸發(fā)
while(1)
{
}
}
/*------------------------------------------------
外部中斷程序
------------------------------------------------*/
void ISR_Key(void) interrupt 0 using 1
{
P1=~P1;
}
接在P3.2口,這是調(diào)試傳感器能否工作的程序。附件為原理圖,還請各位前輩指點一二。
mbq831210 發(fā)表于 2012-3-22 22:58
**** 作者被禁止或刪除 內(nèi)容自動屏蔽 ****
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |