PSOC4 PWM reset pulse at 100%

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

cross mob
Anonymous
Not applicable

I am using a PWM to drive an LED but am wondering how to get around the reset pulse when the compare matches the period at 100% duty cycle. Is there a way to  eliminate this pulse when running the PWM at 100% duty cycle? 

0 Likes
2 Replies
Anonymous
Not applicable

Disable the PWM and set the PIN for the LED high instead (one option)

   

Alternatively, you could use the inverted output from the PWM and invert all of your duty cycle values; That way, the default "reset" state is ON rather than OFF, but then you will run into the same issue for a 0% duty cycle.

   

If you increase the period, the pulse will become relatively smaller in comparison, and thus less overall effect.

   

(Just some thoughts, but I don't know of any really good fix for this)

0 Likes
KaSa_1259906
Level 2
Level 2
First like received

 If you're incrementing the pwm compare in an ISR you can stop the interrupt and you wouldn't have the reset issue.

   

Stopping the PWM and then restarting it will cause a visible brightness glitch. 

0 Likes