PWM in PSoC Creator

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

cross mob
DaCh_4286001
Level 3
Level 3
First like received First like given

Hello all,

I just started to use Psoc Creator and I have a question for the PWM block.

On the left side of the block there is a clock which you will need to set a value. While if you double click the PWM label, you will also need to set the period for PWM. What are the relationships between the clock and PWM period? As I know, you will need these two value to figure out the real-time period.

Thank you

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You will need PeriodValue clock counts for a complete PWM period. The compare value must be between 0 and the period value to set the duty-cycle between 0 and 100 percent.

Bob

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You will need PeriodValue clock counts for a complete PWM period. The compare value must be between 0 and the period value to set the duty-cycle between 0 and 100 percent.

Bob

0 Likes

Sorry I am still confused.

Suppose I set PWM to 100 and PeriodValue clock to 100Hz. What does this mean?

Simon

0 Likes

PWM clock = 100Hz (quite slow) / Period value 100 results in a 1Hz PWM signal. By setting the compare value betweem 0 and 100 you can control the duty-cycle.

Besides this explanation, tell a bit more what you want to perform with your PWM.

Bob