how to generate two pulses simultaneously in arduino due

hello guys,

i need a help in program where i have to generate pulses like the image in the below. the frequency is 50khz. i got a knowledge from another forum post https://forum.sparkfun.com/viewtopic.php?f=32&t=38199. thanks to that post.

i cant understand how to generate another pulse at the same time or in parallel. can u please help me with this.

http://postimg.org/image/j8dywygk5/

In code with software timing loops or with two hardware timers.

If the OP needs very precise timing then I would suggest he read section 39 of the PDF below.

http://www.atmel.com/Images/doc11057.pdf

I believe that with all the registers that can be set, and given a common clock, 2 timers can be setup to make almost any 2 waveforms. I would Google around for an Arduino Due timer library. Perhaps somebody has written an easy-to-use collection of functions to set all those registers.

Those pulses do not happen at the same time. They are synchronised at their centers. But the flanks change at different moments. This is called ‘phase correct PWM’. 2 individual PWM timers would need to be set as phase correct with different dutycycles to make the timing in that image possible.

What exactly do you need to be ‘at the same time’?

i need to trigger two switches through those pulses. i have arduino due and how to do it cause there are less libraries available for it

http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM