You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Increase analogWrite frequency range, bugfixes (#918)
* analogWrite: fix overflow and wrap value (#917)
-avoid overflow when calculating analogScale * analogFreq, perform
the multiplication in floating point.
-use analogScale - 1 to set the PWM wrap value. Wrap is the highest
value the counter reaches, not the counter period.
* analogWrite: increase frequency range (#917)
- increase frequency range to 10 MHz
- decrease the lowest allowed resolution to 2 bits, and the
minimal analogRange value to 3. This makes 10 MHz output possible
with system clock frequencies down to 50 MHz.
- allow clkdiv values >= 1.0, was 2.0. This makes it possible to
manually set frequency and analogRange so that
frequency * analogRange = system clock frequency.
This gives the best possible frequency accuracy and
resolution.
0 commit comments