Multi Function Timers in PWM Mode on 48/52.
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
·
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
It will roll over, before resetting the output pin...
...some more code to write.
-Dan
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
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
··