Main Site Documentation

Phased pulses on panda II


#1

I am trying to program my panda II to create 3 pulse trains on three pins at a given frequency (say…50khz). The first pulse train is the main one, with the other two at a specified adjustable phase angle to it.
I can create the pulses with outputcompare or the PWM function but I need to then delay the start of the phased pulse trains using a nanosecond or microsecond timer. I also need to keep them aligned to each other. I can’t find any documentation about timers that is helpful.
The doco is very sparse and seems to assume you know stuff that is never explained.
Does anybody know where I can find such info?


#2

Hi Dave8 and welcome to the forums.

Personally, I think that you may have to delve into RLP to do this specific task, as you have very specific requirements.

I’m sure people here would love to hear why you need, or appear to need, such tight timing constraints? What’s at the other end(s) of those pulse trains?

ciao


#3

Thanks for your quick reply Brett. I am building a specialised charging controller and I need to trigger electronic switches in sequence. I have already built a single phase version using PWM with adjustable frequency and duty cycle. I really only know C# programming so I don’t know how to do the RLP work. Are there any nano- or microsecond timers available in the Panda II?


#4

Shouldn’t PWM use all the same frequency by default? Then an adjustment of the duty cycle of each pin (and possibly an inversion afterwards) should do the trick.


#5

per the documentation (GHI API), “All PWM pins share the same timer. Changing one PWM frequency will affect the others.”


#6

Thanks SteH and ianlee74, I’ll look at that solution…
Create PWM signals on three pins which all share the same timer and so should hopefully be in synchrony. Use an initial false state for varying times to create the phase angle required…hmmm
I’ll get back to you when I’ve checked it out.
I’d still like to know how to time nan- and micro- second delays ???


#7

Hello Dave8,

Were you able to solve your phase shift problem. I have a requirement of generating multiple pulses with different phases and varying width of 1us to 50us. Using RLP, I have managed to generate 1us pulse but would like to know how to shift the phase.