为什么进不了外部中断? 请指教
|
||||
---|---|---|---|---|
新會員
|
#include"p33fj16mc304.h"
int main() { _INT0EP=1;//下降沿中断 _INT0IP=6;//中断优先级为6 _INT0IE=1;//中断使能 ADPCFG=0XFF;//禁用ad TRISC=0;//c口输出,驱动led,只是中断状态 LATC=0xff;//让led全亮 TRISB=0XFF;//中断0的pin,设为输入. while(1); } void _ISR _INT0Interrupt(void) { _INT0IF=0;//清中断标志 LATC=0X00;//一旦进入中断,让led全灭. } 总是进不去中断,int0脚,上皆有上拉电阻.
發表於: 2009/10/17 18:42
|
|||
|