How to configure duty ratio of PWM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello members

I do not know how to configure the PWM duty ratio.

For example, when setting the PWM as shown in the attached file (PWM_Configure.JPG)
How can I configure the duty ratio to 50% (H: 50, L: 50)?

Best Regards

0 Likes
1 Solution
NidhinM_71
Employee
Employee
25 solutions authored 10 solutions authored Welcome!

Hello.

Dutycycle of the PWM =  Compare / (Period - 1)

In your configuration, with Period0 fixed at 100, you can get ~50% duty cycle by setting the Compare0 at 50.

pastedImage_0.png

Please let me know if you have more questions on this.

Regards
Nidhin

View solution in original post

0 Likes
1 Reply
NidhinM_71
Employee
Employee
25 solutions authored 10 solutions authored Welcome!

Hello.

Dutycycle of the PWM =  Compare / (Period - 1)

In your configuration, with Period0 fixed at 100, you can get ~50% duty cycle by setting the Compare0 at 50.

pastedImage_0.png

Please let me know if you have more questions on this.

Regards
Nidhin

0 Likes