Conflicting interrupts

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Drakkor
Posts: 41
Joined: Sun Dec 30, 2012 9:34 pm
Has thanked: 5 times
Been thanked: 4 times
Contact:

Conflicting interrupts

Post by Drakkor »

Hi.
I am using a Pic12f675 and I am so close to completing a project but there is one problem. I have a Tmr0 interrupt to ramp up/down one LED and and flash two LEDs PWM. I am using port interrupt on change, GPIO2. To control if the led routine is on or off (From a radio control receiver), I am using the rising edge, then the falling edge to determine a PWM above (Any width) but I am wanting 'ON' if above 1.5ms pulse width which I have working already. I know that the problem is the interrupts overlapping. I disable the tmr0 while checking the gpio interrupt and visa versa. This causes my timing/count to be all screwed up : ( I can't post the code as I am at work right now but if there is a solution, I am assuming there is a standard/common way of avoiding what is happening in my code?

Post Reply