I burned a project that had pin 3 of my 12f629 enabled for interrupt on pin change. I did this so I can put the pic to sleep, and wake it back up when a certian switch is enabled. it works great.
now I am rewriting the code so I can use the tmr0 feature. this is so I can have accurate timing thoughout my code. everything works fine in MPLAB with this enabled, and the interrupt on pin change disabled.
Now I decided to include the interrupt on pin change, but after I write my settings to the intcon register, INTCON bit 0 goes high (if pin 3 is high), and then goes to my interrupt routine. Even in my interrupt routine, I clear that bit, and it goes back to high as soon as I clear it. This is with the input high, and not changing states. it is treating it as the pin state has changed, every time, even though it has not.
I noticed if i don't enable the tmr0 interrupt, then it works fine. so i am thinking that either the interrupt on pin change, and tmr0 don't like to be set together, or maybe MPLAB has an issue???
Thanks.
steve
now I am rewriting the code so I can use the tmr0 feature. this is so I can have accurate timing thoughout my code. everything works fine in MPLAB with this enabled, and the interrupt on pin change disabled.
Now I decided to include the interrupt on pin change, but after I write my settings to the intcon register, INTCON bit 0 goes high (if pin 3 is high), and then goes to my interrupt routine. Even in my interrupt routine, I clear that bit, and it goes back to high as soon as I clear it. This is with the input high, and not changing states. it is treating it as the pin state has changed, every time, even though it has not.
I noticed if i don't enable the tmr0 interrupt, then it works fine. so i am thinking that either the interrupt on pin change, and tmr0 don't like to be set together, or maybe MPLAB has an issue???
Thanks.
steve