generating complimentary PWM with dead time

I want to generate complimentary PWM signals to drive high side and low side switch, with certain dead time. I am generating PWM using timer 2 in fast PWM mode.
I used Compare match interrupt, but that did not serve the job. Can it be achieved with Overflow interrupt?
If yes, please tell me the parameter to be varied.

arduino_query.ino (368 Bytes)

Read LOW to HIGH and HIGH to LOW transitions separately and calculate the period and duty fraction every cycle. No problem really. Why are you outputing in the isr? Use loop to run 'perception time limited' output code.

Check out the code in this thread. I think it does what you need.