thannara123
Advanced Member level 5
I have two interrupt fucntion one for generation of PWM signal for sinewave generation and the other is for (pwm) generating signal to battery charger .
Whenevr the supply is available the Battery charger PWM interrupt function should work and the sinewave geration pwm must be turnerd off and viceversa.
I am using only one CCP Pin for the both funtion How to manage it ,Can i use software logic [A condiotins if()] for each function to run
void interrupt timer_isr()
{
if(TMR2IF==1) // first interrupt function for sinewave // Function A
{
// contents
TMR2IF = 0;
}
if() // second interrupt function for Battery charging // Function B
{
}
}
what is the technique to run only one of the function as said above .
Here the TIMER2 MODULE is using for the two operations ie , the function A and B .
Whenevr the supply is available the Battery charger PWM interrupt function should work and the sinewave geration pwm must be turnerd off and viceversa.
I am using only one CCP Pin for the both funtion How to manage it ,Can i use software logic [A condiotins if()] for each function to run
void interrupt timer_isr()
{
if(TMR2IF==1) // first interrupt function for sinewave // Function A
{
// contents
TMR2IF = 0;
}
if() // second interrupt function for Battery charging // Function B
{
}
}
what is the technique to run only one of the function as said above .
Here the TIMER2 MODULE is using for the two operations ie , the function A and B .