Re: PWM1 & PWM3 synchrounization problem!!



MSAD wrote:
Dear all,
Good day!!
I am setting COMPR1 and COMPR2 to produce two variable-duty cycle PWM
signals. although both signals are having the same period etc. (off course
with different compare values). However, unfortunetly, what I am having on
the Oscelliscope is that one signal is travelling with respect to other
one.
on the other hand, if i use the same table (compare values) for both
COMPR1 and COMPR2 then both signals will be in sync. (tied to each
other).
hence, I can't really understand what makes one of them travelling with
respect to the other since both of them are using the same timer1 and same
period ,,, etc.
any comments/ suggestions would be greatly appreciated

kindes regards
MSAD

If you're going to mention specific registers you should specify what processor you're using.

Since I have no idea what processor you're using I cannot be specific, so here's some questions you can ask yourself.

* Are they really tied to one timer? Double check that manual!
* Is the timer a period register, or is this something perverse like
the Motorola (Freescale) 68HC11 where the timer always free runs
and the compare has to be jiggered in software?
* Some more advanced PWM generators will drive the timer in a triangle
wave, so the resulting PWM will be symmetrical around the peaks of
the triangle; this will result in PWM outputs that are centered on
each other, but who's edges are not synchronous.
* If you run the compares with different values for a while then go
back, to they become synchronous again?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google? See http://cfaj.freeshell.org/google/
.



Relevant Pages

  • Didactic Quality of Datasheets (Texas Timers)
    ... But for the moment the Texas Instruments TMS320C24x Peripheral ... Only Timer 2&3 can be cascaded. ... its own compare function but there are also 3 full compare units and ... a hold current limited by PWM should ...
    (comp.arch.embedded)
  • Re: Didactic Quality of Datasheets (Texas Timers)
    ... > its own compare function but there are also 3 full compare units and ... > My Timer 2 is connected to an encoder. ... a hold current limited by PWM should ... This task requires 2 timer outputs one for initial pulse ...
    (comp.arch.embedded)
  • Re: PWM1 & PWM3 synchrounization problem of F2118 DSP!!
    ... I am setting COMPR1 and COMPR2 to produce two variable-duty cycle PWM ... although both signals are having the same period etc. (off ... if i use the same table (compare values) for both ... Is the timer a period register, or is this something perverse like ...
    (comp.dsp)
  • Re: PWM -> Audio Output
    ... What is important in using a timer for pwm is the interrupt/reset value. ... In this case the timer resolution may be 16 bit, the pwm resolution is 8 bit. ... Why use a buffer when the audio You want to play is sitting around in memory? ...
    (comp.arch.embedded)
  • Re: phase comparator
    ... > I would like to compare the phase of two 1MHz sinewave and/or ... > squarewave) signals and get a output voltage proportional to their phase ... Is this because an IQ modulator/demodulator ... "Phase Lock Loop Circuit Design" by Dan Wolaver is a good book. ...
    (sci.electronics.design)