This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PWM frequency changes on Run Time?

PWM frequency and PWM steps resolution are related, we increase one and the other decrease and vice versa, we want high PWM frequency so we have low flickering and we want high steps resolution for smooth dimming, specially on the low end due to non linear curve of light lightness, so we cant have high frequency and high resolution at the same time, we could however have a dynamic frequency settings that lowers the frequency during dimming to provide smooth dimming and then high frequency to provide low flickering? I am not sure if this dynamic PWM settings are a possibility though… I don’t know if they can be adjusted on run time?

Parents
  • Hi,

    Did you configure PWM at highest possible frequency? From my experience, 4096 levels is enough for smooth backlight dimming, maybe in your case you need more, but 16k should be fine anyway. At 16MHz PWM clock this gives 1kHz that is quite comfortable for eyes.


    I don’t know if they can be adjusted on run time?

    Yes, you can configure dynamic frequency using WaveForm mode. In this mode, fourth halfword from each step will be loaded into COUNTERTOP.

Reply
  • Hi,

    Did you configure PWM at highest possible frequency? From my experience, 4096 levels is enough for smooth backlight dimming, maybe in your case you need more, but 16k should be fine anyway. At 16MHz PWM clock this gives 1kHz that is quite comfortable for eyes.


    I don’t know if they can be adjusted on run time?

    Yes, you can configure dynamic frequency using WaveForm mode. In this mode, fourth halfword from each step will be loaded into COUNTERTOP.

Children
No Data
Related