- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all:
the pwm calculation:
Initial count = 0xFFFF - (Input Clock Freq / PWM Freq out)
Toggle count = 0xFFFF - ((duty cycle in percentage) * (Input Clock Freq / PWM Freq out) / 100)
so the PWM resolution is 1/100, I want to know if I can change the PWM resolution to 1/1000
Calculation formula:
Initial count = 0xFFFF - (Input Clock Freq / PWM Freq out)
Toggle count = 0xFFFF - ((duty cycle in thousandth) * (Input Clock Freq / PWM Freq out) / 1000)
thanks!
mandy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I am sure that the PWM accuracy is the root cause, now I have enhanced the PWM accuracy, the flicker question has been resolved
thanks!
mandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you explain the background of the questions you described?
From the description, we don't understand what do you want to do and what issue you meet?
Or could you tell us the formula where you get?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi LinglingG_46:
the application background is to control the dimmable light brightness, we can control the PWM pulse width to change the brightness, each time the PWM pulse width changes too much, it will cause the lamp to flicker !
the Calculation formula is supported by RanjithK_41
Initial count = 0xFFFF - (Input Clock Freq / PWM Freq out)
Toggle count = 0xFFFF - ((duty cycle in percentage) * (Input Clock Freq / PWM Freq out) / 100
the website is below:
CYW20719 and CYW20735 Clocks, RTC, WatchDog Timer, Application Timer and PWM
I want to know if I can change the duty cycle from percentage to thousandth, if it is possible, it will
Improve the accuracy of PWM duty cycle
thanks!
mandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you check if the PWM accuracy is the root cause? I am not sure if 1% change of the PWM output will cause a flicker.
As we tested before, when you set the PWM output to 100% or 0%, the output may be wrong. Could you check if that is the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I am sure that the PWM accuracy is the root cause, now I have enhanced the PWM accuracy, the flicker question has been resolved
thanks!
mandy