From 1880ddca9ea9cfac0cf901fa0112fe450e753624 Mon Sep 17 00:00:00 2001 From: laokaiyao Date: Thu, 17 Aug 2023 18:29:58 +0800 Subject: [PATCH] docs(dac): added the explanation to Vref (v5.1) --- docs/en/api-reference/peripherals/dac.rst | 7 ++++--- docs/zh_CN/api-reference/peripherals/dac.rst | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/en/api-reference/peripherals/dac.rst b/docs/en/api-reference/peripherals/dac.rst index 82c81a57d2..9e25b4c6c0 100644 --- a/docs/en/api-reference/peripherals/dac.rst +++ b/docs/en/api-reference/peripherals/dac.rst @@ -3,13 +3,14 @@ Digital To Analog Converter (DAC) :link_to_translation:`zh_CN:[中文]` -{IDF_TARGET_DAC_CH_1: default = "GPIO25", esp32 = "GPIO25", esp32s2 = "GPIO17"} -{IDF_TARGET_DAC_CH_2: default = "GPIO26", esp32 = "GPIO26", esp32s2 = "GPIO18"} +{IDF_TARGET_DAC_CH_1: default = "Not Updated!", esp32 = "GPIO25", esp32s2 = "GPIO17"} +{IDF_TARGET_DAC_CH_2: default = "Not Updated!", esp32 = "GPIO26", esp32s2 = "GPIO18"} +{IDF_TARGET_DAC_REF_PIN: default = "Not Updated!", esp32 = "VDD3P3_RTC", esp32s2 = "VDD3P3_RTC_IO"} Overview -------- -{IDF_TARGET_NAME} has two 8-bit DAC (digital to analog converter) channels respectively connected to {IDF_TARGET_DAC_CH_1} (Channel 1) and {IDF_TARGET_DAC_CH_2} (Channel 2). Each DAC channel can convert the digital value 0~255 to the analog voltage 0~Vref. The output voltage can be calculated as the following:: +{IDF_TARGET_NAME} has two 8-bit DAC (digital to analog converter) channels respectively connected to {IDF_TARGET_DAC_CH_1} (Channel 1) and {IDF_TARGET_DAC_CH_2} (Channel 2). Each DAC channel can convert the digital value 0~255 to the analog voltage 0~Vref (the reference voltage 'Vref' here is input from the pin {IDF_TARGET_DAC_REF_PIN}, which ideally equals to the power supply VDD). The output voltage can be calculated as the following:: out_voltage = Vref * digi_val / 255 diff --git a/docs/zh_CN/api-reference/peripherals/dac.rst b/docs/zh_CN/api-reference/peripherals/dac.rst index b202332972..b333626ee9 100644 --- a/docs/zh_CN/api-reference/peripherals/dac.rst +++ b/docs/zh_CN/api-reference/peripherals/dac.rst @@ -3,13 +3,14 @@ :link_to_translation:`en:[English]` -{IDF_TARGET_DAC_CH_1: default = "GPIO25", esp32 = "GPIO25", esp32s2 = "GPIO17"} -{IDF_TARGET_DAC_CH_2: default = "GPIO26", esp32 = "GPIO26", esp32s2 = "GPIO18"} +{IDF_TARGET_DAC_CH_1: default = "Not Updated!", esp32 = "GPIO25", esp32s2 = "GPIO17"} +{IDF_TARGET_DAC_CH_2: default = "Not Updated!", esp32 = "GPIO26", esp32s2 = "GPIO18"} +{IDF_TARGET_DAC_REF_PIN: default = "Not Updated!", esp32 = "VDD3P3_RTC", esp32s2 = "VDD3P3_RTC_IO"} 概况 ---- -{IDF_TARGET_NAME} 有两个 8 位数模转换器 (DAC) 通道,分别连接到 {IDF_TARGET_DAC_CH_1}(通道 1)和 {IDF_TARGET_DAC_CH_2}(通道 2)。每个 DAC 通道可以将数字值 0~255 转换成模拟电压 0~Vref。输出电压可按以下方式计算:: +{IDF_TARGET_NAME} 有两个 8 位数模转换器 (DAC) 通道,分别连接到 {IDF_TARGET_DAC_CH_1}(通道 1)和 {IDF_TARGET_DAC_CH_2}(通道 2)。每个 DAC 通道可以将数字值 0~255 转换成模拟电压 0~Vref(此处的 Vref 为 {IDF_TARGET_DAC_REF_PIN} 引脚输入的参考电压,一般来说其输入的电压值应等于电源电压 VDD)。输出电压可按以下方式计算:: out_voltage = Vref * digi_val / 255