Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编程 PIC18F4520,并使用 picos18 进行多任务处理。我需要用 PORTB 控制按钮。我正在使用中断,但我遇到了问题。
突然间(当我没有按下按钮时),我的中断处理程序执行了。我的图片处理了许多中断。
可能是什么原因??
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.