1

I am programming PIC18F4520, and using picos18 for multitasking. I need to control buttons with PORTB. I am using interrupts, but I am facing a problem.

Out of nowhere (while I am not pressing buttons), my interrupt handler executes. My pic handles many interrupts.

What could be the reason??

4

1 に答える 1

0

使用しているハードウェア割り込みの種類を指定する必要があります!

私はRBポート変更割り込みを想定しています。PORTB のプルアップ抵抗を有効にしましたか? そうでない場合、PORTB 入力ピンはフローティングの可能性があります。

于 2011-05-22T19:09:50.320 に答える