cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

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
Reply
1 Solution
odissey1
Honored Contributor II

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
Reply
2 Replies
odissey1
Honored Contributor II

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
Reply
Anonymous
Not applicable

Hi,

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

Thanks,

MohanRaj R

0 Likes
Reply