开发者

pic18f4520 with picos18- interrupt problem

开发者 https://www.devze.com 2023-03-07 09:23 出处:网络
I am programming PIC18F4520, and using picos18 for multitasking. I need to control buttons with PORTB. I am using interrupts, b开发者_JS百科ut I am facing a problem.

I am programming PIC18F4520, and using picos18 for multitasking. I need to control buttons with PORTB. I am using interrupts, b开发者_JS百科ut 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??


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消