aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/api/analogwrite.rst
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-04-26 03:27:10 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-04-26 03:27:10 -0400
commit1f98566c939c84a986ee8b60fde6aa601c3521da (patch)
tree8a0069ca9758bf6f3952bd71bf1a7c149d161bc1 /docs/source/lang/api/analogwrite.rst
parent621706150fc55b8266229131cc7fb6db6b2f7cd9 (diff)
downloadlibrambutan-1f98566c939c84a986ee8b60fde6aa601c3521da.tar.gz
librambutan-1f98566c939c84a986ee8b60fde6aa601c3521da.zip
0.0.10 Documentation checkpoint.
The vast majority of the Maple-specific values have been pulled out of the higher-level overview pages and replaced with refs into documents under /docs/source/hardware/. Much of the work that's left to be done in this regard is labeled with versioned TODO and FIXME comments. Suggestions from StephenFromNYC and gbulmer were incorporated from this forum thread: http://forums.leaflabs.com/topic.php?id=703
Diffstat (limited to 'docs/source/lang/api/analogwrite.rst')
-rw-r--r--docs/source/lang/api/analogwrite.rst23
1 files changed, 11 insertions, 12 deletions
diff --git a/docs/source/lang/api/analogwrite.rst b/docs/source/lang/api/analogwrite.rst
index 9147b96..e789305 100644
--- a/docs/source/lang/api/analogwrite.rst
+++ b/docs/source/lang/api/analogwrite.rst
@@ -65,12 +65,12 @@ This will convert values in the range 0-255 to values in the range
which control PWM output. See the :ref:`timers reference <timers>`
for more information.
-Another fix is to consult the :ref:`pin mapping mega table
-<pin-mapping-mega-table>` to find the timer which controls PWM on the
-pin you're using, then set that Timer's overflow to 255. Subsequent
-calls to analogWrite() should work as on the Arduino (with the same
-loss of precision). Note, however, that that affects the overflow for
-the **entire timer**, so other code relying on that timer (such as any
+Another fix is to consult your board's :ref:`pin maps <gpio-pin-maps>`
+to find the timer which controls PWM on the pin you're using, then set
+that Timer's overflow to 255. Subsequent calls to analogWrite()
+should work as on the Arduino (with the same loss of precision).
+Note, however, that that affects the overflow for the **entire
+timer**, so other code relying on that timer (such as any
:ref:`interrupts <lang-attachinterrupt>` the timer controls) will
likely need to be modified as well.
@@ -140,9 +140,9 @@ If your application definitely requires Arduino's PWM frequency, then
the steps are:
1. Figure out which :ref:`timer <lang-hardwaretimer>` controls PWM
- output on your pin (\ :ref:`this table <pwm-timer-table>` is your
- friend here). Let's say it's ``Timern``\ , where ``n`` is some
- number 1, 2, 3, or 4.
+ output on your pin (\ :ref:`your board's Timer Pin Map
+ <gpio-pin-maps>` is your friend here). Let's say it's ``Timern``\
+ , where ``n`` is some number 1, 2, 3, or 4.
2. Call ``Timern.setPeriod(2041)``\ . This will set the timer's
period to approximately 2041 microseconds, which is a frequency of
@@ -154,7 +154,7 @@ timer. The important examples are :ref:`timer interrupts
<lang-hardwaretimer-attachinterrupt>` and :ref:`PWM
<timers-pwm-conflicts>`\ .
-See also
+See Also
--------
- :ref:`Maple PWM tutorial <pwm>`
@@ -169,5 +169,4 @@ See also
Maple uses 2 bytes of memory, and an unsigned (i.e., nonnegative)
integer with size 2 bytes can hold the values between 0 and 65,535.
-
-.. include:: cc-attribution.txt
+.. include:: /arduino-cc-attribution.txt