-
Notifications
You must be signed in to change notification settings - Fork 10
upload ADC DAC #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/idf/adc.rst
Outdated
| @@ -0,0 +1,234 @@ | |||
| Analog to Digital Converter | |||
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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 đó. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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):: | ||
|
|
There was a problem hiding this comment.
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:: | ||
|
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.code ::cpp
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.