rajeshgaut
Newbie level 5
I am working with PIC 16f877A, using internal voltage comparator module with Interrupt.
The inverting pin is connected to 0 to 5 volt adjustable external ref voltage. adjusted for 2 volts.
at non-inverting pin is connected to pure sine wave voltage source (0 to 5 volt).
I want interrupt should occur when sine wave voltage reaches at 2 volts.
Now the problem is that… when sine wave voltage reaches to 2 volts the MCU gets hanged up. Even I am clearing the comparator flag in the interrupt subroutine. I tried to disable comp interrupt in interrupt subroutine but prob is same…
Please help me out….
The inverting pin is connected to 0 to 5 volt adjustable external ref voltage. adjusted for 2 volts.
at non-inverting pin is connected to pure sine wave voltage source (0 to 5 volt).
I want interrupt should occur when sine wave voltage reaches at 2 volts.
Now the problem is that… when sine wave voltage reaches to 2 volts the MCU gets hanged up. Even I am clearing the comparator flag in the interrupt subroutine. I tried to disable comp interrupt in interrupt subroutine but prob is same…
Please help me out….