1

我正在编程 PIC18F4520,并使用 picos18 进行多任务处理。我需要用 PORTB 控制按钮。我正在使用中断,但我遇到了问题。

突然间(当我没有按下按钮时),我的中断处理程序执行了。我的图片处理了许多中断。

可能是什么原因??

4

1 回答 1

0

You need to tell as which kind of hardware interrupt you are using!

I suppose on RB port change interrupt. So did you enable pull-ups resistors on PORTB? If you didn't than PORTB input pins have floating potential.

于 2011-05-22T19:09:50.320 回答