Skip to content

Conversation

@tridung141196
Copy link
Contributor

em làm 2 bài ADC và DAC.
Bài ADC em sẽ quay clip demo và bổ sung vô sau.
Anh Tuấn xem có lỗi nào nhắc nhở em, em sẽ chỉnh sửa lại.

docs/idf/adc.rst Outdated
@@ -0,0 +1,234 @@
Analog to Digital Converter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sửa thành Chuyển đổi tương tự sang số (Analog to Digital)

docs/idf/adc.rst Outdated
Tổng quan
--------

ESP32 tích hợp 12-bit SAR ("Successive Approximation Register") ADCs (Analog to Digital Converters) và hỗ trợ đo trên 18 chân analog. Một trong số các chân này được dùng để xây dựng bộ khuyếch đại có độ lợi khả trình (programmable gain amplifier) nhằm đo các tín hiệu analog yếu.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Đổi ESP32 tích hợp 12-bit SAR ("Successive Approximation Register") ADCs (Analog to Digital Converters) thành ESP32 tích hợp 12-bit SAR (Successive Approximation Register) ADCs và thêm footnote giải thích SAR là gì luôn

docs/idf/adc.rst Outdated
Các API điểu khiển ADC hiện tại chỉ hổ trợ 9 kênh ADC1 (từ GPIO32 đến GPIO39).


The ADC driver API currently only supports ADC1 (9 channels, attached to GPIOs 32-39).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bỏ dòng tiếng Anh này

docs/idf/adc.rst Outdated

Cấu hình điện áp lấy mẫu cho kênh .

Điện áp mặc định của ADC là 1.1V. Để có thể đọc được các điện áp cao hơn (bằng với điện áp tối đa của chân esp32 là 3.3v) thì cần phải cài đặt suy giảm tín hiệu cho kênh ADC đó.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mạch chia áp chứ ko phải mạch suy giảm

docs/idf/adc.rst Outdated

void adc1_ulp_enable()

Khai báo ADC1 sử dụng ULP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link tới phần ULP của espressif

docs/idf/adc.rst Outdated
- ``atten`` : mức suy giảm.


.. code:: bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cpp

**Ví dụ**

Đọc gía trị điện áp ở kênh 0 của ADC1(GPIO26)::

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.code ::cpp

int val = adc1_get_voltage(ADC1_CHANNEL_0);

Đọc tín hiệu từ cảm biến hiệu ứng Hall::

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.code ::cpp

docs/idf/adc.rst Outdated

**Một số hàm trong thư viện ``adc.h``**

.. code:: bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.code ::cpp

docs/idf/adc.rst Outdated
- ``width``: Độ rộng bit của ADC1.


.. code:: bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.code ::cpp

@tuanpmt tuanpmt merged commit 564fa89 into esp32vn:master Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants