forked from espressif/esp-idf
docs: update EC11 datasheet link
Closes https://github.com/espressif/esp-idf/issues/12442
This commit is contained in:
@@ -13,7 +13,7 @@ The signal that HC-SR04 produces (and what can be handled by this example) is a
|
|||||||
|
|
||||||
Typical signals:
|
Typical signals:
|
||||||
|
|
||||||
```
|
```text
|
||||||
Trig +-----+
|
Trig +-----+
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
@@ -36,20 +36,22 @@ Echo +-----+
|
|||||||
|
|
||||||
Connection :
|
Connection :
|
||||||
|
|
||||||
```
|
```text
|
||||||
+------+ +---------------------------------+
|
+------+ +--------------------------------------+
|
||||||
+-------+ | | |
|
+-------+ | | |
|
||||||
| | VCC +--------------+ 5V |
|
| | VCC +--------------+ 5V |
|
||||||
+-------+ | | |
|
+-------+ | | |
|
||||||
+ Echo +----=====>----+ GPIO18 (internal pull up) |
|
+ Echo +----=====>----+ HC_SR04_ECHO_GPIO (internal pull up) |
|
||||||
| | | |
|
| | | |
|
||||||
+ Trig +----<=====----+ GPIO19 |
|
+ Trig +----<=====----+ HC_SR04_TRIG_GPIO |
|
||||||
+-------| | | |
|
+-------| | | |
|
||||||
| | GND +--------------+ GND |
|
| | GND +--------------+ GND |
|
||||||
+-------| | | |
|
+-------| | | |
|
||||||
+------+ +---------------------------------+
|
+------+ +--------------------------------------+
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can change the GPIO number according to your board, by `HC_SR04_TRIG_GPIO` and `HC_SR04_ECHO_GPIO` in the [source code](main/mcpwm_capture_hc_sr04.c).
|
||||||
|
|
||||||
### Build and Flash
|
### Build and Flash
|
||||||
|
|
||||||
Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
|
Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
|
||||||
@@ -60,7 +62,7 @@ See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/l
|
|||||||
|
|
||||||
## Example Output
|
## Example Output
|
||||||
|
|
||||||
```
|
```text
|
||||||
I (0) cpu_start: Starting scheduler on APP CPU.
|
I (0) cpu_start: Starting scheduler on APP CPU.
|
||||||
I (304) example: Create capture queue
|
I (304) example: Create capture queue
|
||||||
I (304) example: Install capture timer
|
I (304) example: Install capture timer
|
||||||
|
@@ -6,13 +6,14 @@
|
|||||||
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
||||||
|
|
||||||
The PCNT peripheral is designed to count the number of rising and/or falling edges of an input signal. Each PCNT unit has two channels, which makes it possible to extract more information from two input signals than only one signal.
|
The PCNT peripheral is designed to count the number of rising and/or falling edges of an input signal. Each PCNT unit has two channels, which makes it possible to extract more information from two input signals than only one signal.
|
||||||
This example shows how to make use of the HW features to decode the differential signals generated from a common rotary encoder -- [EC11](https://tech.alpsalpine.com/prod/e/html/encoder/incremental/ec11/ec11_list.html).
|
|
||||||
|
This example shows how to make use of the HW features to decode the differential signals generated from a common rotary encoder -- [EC11](https://tech.alpsalpine.com/e/products/category/encorder/sub/01/series/ec11e/).
|
||||||
|
|
||||||
The signals a rotary encoder produces (and what can be handled by this example) are based on a 2-bit gray code available on 2 digital data signal lines. The typical encoders use 3 output pins: 2 for the signals and one for the common signal usually GND.
|
The signals a rotary encoder produces (and what can be handled by this example) are based on a 2-bit gray code available on 2 digital data signal lines. The typical encoders use 3 output pins: 2 for the signals and one for the common signal usually GND.
|
||||||
|
|
||||||
Typical signals:
|
Typical signals:
|
||||||
|
|
||||||
```
|
```text
|
||||||
A +-----+ +-----+ +-----+
|
A +-----+ +-----+ +-----+
|
||||||
| | | |
|
| | | |
|
||||||
| | | |
|
| | | |
|
||||||
@@ -35,7 +36,7 @@ B +-----+ +-----+ +-----+
|
|||||||
|
|
||||||
Connection :
|
Connection :
|
||||||
|
|
||||||
```
|
```text
|
||||||
+--------+ +---------------------------------+
|
+--------+ +---------------------------------+
|
||||||
| | | |
|
| | | |
|
||||||
| A +--------------+ GPIO_A (internal pull up) |
|
| A +--------------+ GPIO_A (internal pull up) |
|
||||||
@@ -49,11 +50,11 @@ Connection :
|
|||||||
+--------+ +---------------------------------+
|
+--------+ +---------------------------------+
|
||||||
```
|
```
|
||||||
|
|
||||||
The GPIO used by the example can be changed according to your board by `EXAMPLE_EC11_GPIO_A` and `EXAMPLE_EC11_GPIO_B` in [source file](main/rotary_encoder_example_main.c);
|
The GPIO used by the example can be changed according to your board by `EXAMPLE_EC11_GPIO_A` and `EXAMPLE_EC11_GPIO_B` in [source file](main/rotary_encoder_example_main.c).
|
||||||
|
|
||||||
### Build and Flash
|
### Build and Flash
|
||||||
|
|
||||||
By configuring one of the EC11 GPIO (e.g. `EXAMPLE_EC11_GPIO_A`) as a wake up source, we can make the rotary encoder wake the system from light sleep. This example can illustrate this feature if you enable the `EXAMPLE_WAKE_UP_LIGHT_SLEEP` from the menuconfig.
|
By configuring one of the EC11 GPIO (e.g. `EXAMPLE_EC11_GPIO_A`) as a wake up source, you can make the rotary encoder wake the system from light sleep. This example can illustrate this feature if you enable the `EXAMPLE_WAKE_UP_LIGHT_SLEEP` from the menuconfig.
|
||||||
|
|
||||||
Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
|
Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/l
|
|||||||
|
|
||||||
## Example Output
|
## Example Output
|
||||||
|
|
||||||
```
|
```text
|
||||||
I (0) cpu_start: Starting scheduler on APP CPU.
|
I (0) cpu_start: Starting scheduler on APP CPU.
|
||||||
I (325) example: install pcnt unit
|
I (325) example: install pcnt unit
|
||||||
I (335) example: set glitch filter
|
I (335) example: set glitch filter
|
||||||
|
Reference in New Issue
Block a user