PWM Duty and Period Calculation

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

cross mob
Anonymous
Not applicable

Hi,

    I need to 1.25 microsecond off and 21.0 microsecond on pulse using pwm and i have used PSoc 5LP cy8ckit - 059 . Could you please help me how to calculate the duty cycle and period for PWM. I am waiting for your reference.

Thanks,

MohanRaj R

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Bring it to round numbers first by multiplying x4:

1.25×4=5 (off)

21×4=84 (on)

Total period 84+5=89, PWM set to 89-1=88.

Set PWM compare=5-1=4, mode 'less then'.

Set external clock freq. 4MHz (5/1.25us)

Sounds like homework. Did I pass the test?

View solution in original post

0 Likes
2 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Bring it to round numbers first by multiplying x4:

1.25×4=5 (off)

21×4=84 (on)

Total period 84+5=89, PWM set to 89-1=88.

Set PWM compare=5-1=4, mode 'less then'.

Set external clock freq. 4MHz (5/1.25us)

Sounds like homework. Did I pass the test?

0 Likes
Anonymous
Not applicable

Hi,

    I am not clear about your answer. Could you please give elaborate description.

Thanks,

MohanRaj R

0 Likes