summaryrefslogtreecommitdiff
path: root/docs/esp32
diff options
context:
space:
mode:
authorMatt Trentini <matt.trentini@gmail.com>2019-09-29 23:36:22 +1000
committerDamien George <damien.p.george@gmail.com>2019-12-20 12:25:38 +1100
commit7f235cbee924305e2d8a8aa86876770af66d7d82 (patch)
tree55d81d67c01bf48f7f4554a8aee87e443cefc8bd /docs/esp32
parent0e0e6132fd90453eafabb71f355012cd82cf05b4 (diff)
docs/esp32: Add quickref and full docs for esp32.RMT class.
Diffstat (limited to 'docs/esp32')
-rw-r--r--docs/esp32/general.rst1
-rw-r--r--docs/esp32/quickref.rst14
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/esp32/general.rst b/docs/esp32/general.rst
index 51918d4e1..8137c042d 100644
--- a/docs/esp32/general.rst
+++ b/docs/esp32/general.rst
@@ -52,6 +52,7 @@ For your convenience, some of technical specifications are provided below:
* I2S: 2
* ADC: 12-bit SAR ADC up to 18 channels
* DAC: 2 8-bit DACs
+* RMT: 8 channels allowing accurate pulse transmit/receive
* Programming: using BootROM bootloader from UART - due to external FlashROM
and always-available BootROM bootloader, the ESP32 is not brickable
diff --git a/docs/esp32/quickref.rst b/docs/esp32/quickref.rst
index ef9b0a2e8..cfe31664e 100644
--- a/docs/esp32/quickref.rst
+++ b/docs/esp32/quickref.rst
@@ -365,6 +365,20 @@ Notes:
p1 = Pin(4, Pin.OUT, None)
+RMT
+---
+
+The RMT is ESP32-specific and allows generation of accurate digital pulses with
+12.5ns resolution. See :ref:`esp32.RMT <esp32.RMT>` for details. Usage is::
+
+ import esp32
+ from machine import Pin
+
+ r = esp32.RMT(0, pin=Pin(18), clock_div=8)
+ r # RMT(channel=0, pin=18, source_freq=80000000, clock_div=8)
+ # The channel resolution is 100ns (1/(source_freq/clock_div)).
+ r.write_pulses((1, 20, 2, 40), start=0) # Send 0 for 100ns, 1 for 2000ns, 0 for 200ns, 1 for 4000ns
+
OneWire driver
--------------