Shop OBEX P1 Docs P2 Docs Learn Events
Multi Function Timers in PWM Mode on 48/52. — Parallax Forums

Multi Function Timers in PWM Mode on 48/52.

dkemppaidkemppai Posts: 315
edited 2005-10-16 02:50 in General Discussion
Hi,

I'm looking for more detail in how the Multi Function timers
function in PWM mode.·

Specifically, I'm trying to figure out if the 16 bit comparator
is a "compare equil" or a "compare greater than or equil" to
type of comparator.

Example, if the counter is the current value of 1000, and I
change the value to 900, will the output toggle when the
change is made, or will the counter roll over and toggle
the output on the next go around. (i.e. when I change
comparison registers, do I need to check the value of the
Counter and reset it if it is greater than the next
corresponding comparison register value)

Any ideas?

-Dan
·

Comments

  • dkemppaidkemppai Posts: 315
    edited 2005-10-13 17:26
    Never mind, found it!

    It will roll over, before resetting the output pin...
    ...some more code to write.

    -Dan
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-13 18:09
    Do share your successes, Dan!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • dkemppaidkemppai Posts: 315
    edited 2005-10-16 02:50
    Jon Williams (Parallax) said...
    Do share your successes, Dan!

    As of friday at 5:00pm, I had the multipurpose timers generating a sine
    modulated 48Khz PWM. This is driving a H-Bridge with Low Pass filters
    to generate a push-pull 60Hz sinewave.·The last time I did this was with
    a SX-28, and·generated each PWM·cycle·(including dead time) in
    code.·This SX-52 is a really nice chip, much much less code!

    -Dan

    ··
Sign In or Register to comment.