Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

doubt regarding Interrupt function (PIC16 f Mplab x8 )

thannara123

Advanced Member level 5
Joined
Jan 7, 2010
Messages
1,580
Helped
122
Reputation
244
Reaction score
114
Trophy points
1,353
Location
India
Activity points
10,382
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 .
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top