Skip to content

Commit ac53c29

Browse files
devyteearlephilhower
authored andcommitted
Clarify analog output doc for pwm limits (esp8266#6051)
* Update reference.rst Clarify analogWrite and PWM limitations. * Update reference.rst
1 parent 95fd7b5 commit ac53c29

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/reference.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ equal to 1023 by default. PWM range may be changed by calling
7070
``analogWriteRange(new_range)``.
7171

7272
PWM frequency is 1kHz by default. Call
73-
``analogWriteFreq(new_frequency)`` to change the frequency.
73+
``analogWriteFreq(new_frequency)`` to change the frequency. Valid values
74+
are from 100Hz up to 40000Hz.
75+
76+
The ESP doesn't have hardware PWM, so the implementation is by software.
77+
With one PWM output at 40KHz, the CPU is already rather loaded. The more
78+
PWM outputs used, and the higher their frequency, the closer you get to
79+
the CPU limits, and the less CPU cycles are available for sketch execution.
7480

7581
Timing and delays
7682
-----------------

0 commit comments

Comments
 (0)