1
\$\begingroup\$

I have a general question regarding the XMEGA384C3 DataSheet. For PORTF, it has a timer 0. Then I can use PF0-PF3 for PWM. Is it possible to have individual PWM duty cycles for each channel simultaneously.

For example PF0 (0C0A) is outputting 50% duty cycle. While PF1 (0C0B) is outputting 75% duty cycle?

\$\endgroup\$
2
\$\begingroup\$

The timer has 4 comparitors which means that each PWM output can have its own independent duty cycle however they must all have the same period.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Are you talking about the Counter Period or the PWM output period? \$\endgroup\$ – zacharoni16 Sep 28 '16 at 16:14
  • 1
    \$\begingroup\$ They are the same thing. The PWM output is low when the counter is greater than the compare register and high when it is less. This means that the PWM period must be the same as the counter period. See the manual section 13.8.3 for details atmel.com/Images/… (For CPUs the datasheet tells you how to connect it up, the manual tells you how it works) \$\endgroup\$ – Andrew Sep 28 '16 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.