My new 3.6 is in, so I am back on track again.
I do have a question about PWM and resolution to check whether I understand the documentation correctly.
In my project I will use multiple PWM outputs.
I have grouped similar output types on timers.
For at least one timer (FTM3) I'd like to change the frequency. I will connect fans / blowers and control them via PWM (via a gate driver and mosfet).
I will need to go to 14648.437 Hz to make sure there is no audible noise.
If I understand the Pulsed Output: PWM & Tone page correctly, while changing the frequency ideally I should also change the resolution. "To configure both frequency and resolution for matching performance, use the values from this table:"
So for the 14,6 kHz frequency that should be a resolution of 12 and as a result use PWM values 0 - 4095 for 0% to 100%.
But in that case all my analogWrite statements need to use the 0 - 4095 range.
The default frequency of 488.28 Hz is not in the table so I assume that one will not have "matching performance" while using a resolution of 12.
Now my question is, if I do not change the analogWriteFrequency of the other timers, what to I do?
How important is matching performance anyway?
I'm just controlling some pumps, fans etc. so nothing that (as far as I expect) required high accuracy.
Thanks in advance for shining some light on the matter.
I do have a question about PWM and resolution to check whether I understand the documentation correctly.
In my project I will use multiple PWM outputs.
I have grouped similar output types on timers.
For at least one timer (FTM3) I'd like to change the frequency. I will connect fans / blowers and control them via PWM (via a gate driver and mosfet).
I will need to go to 14648.437 Hz to make sure there is no audible noise.
If I understand the Pulsed Output: PWM & Tone page correctly, while changing the frequency ideally I should also change the resolution. "To configure both frequency and resolution for matching performance, use the values from this table:"
So for the 14,6 kHz frequency that should be a resolution of 12 and as a result use PWM values 0 - 4095 for 0% to 100%.
But in that case all my analogWrite statements need to use the 0 - 4095 range.
The default frequency of 488.28 Hz is not in the table so I assume that one will not have "matching performance" while using a resolution of 12.
Now my question is, if I do not change the analogWriteFrequency of the other timers, what to I do?
How important is matching performance anyway?
I'm just controlling some pumps, fans etc. so nothing that (as far as I expect) required high accuracy.
Thanks in advance for shining some light on the matter.