This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
products:sbc:vim3:applications:gpio:adc [2022/12/21 21:29] ivan |
products:sbc:vim3:applications:gpio:adc [2022/12/21 21:29] (current) ivan [VIM3/3L ADC] |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== VIM3/3L ADC ====== | ====== VIM3/3L ADC ====== | ||
| + | ===== Introduction ===== | ||
| + | |||
| + | This documentation will introduce the usage of ADC. | ||
| + | |||
| + | |||
| + | ===== Hardware Information ===== | ||
| + | |||
| + | The ADC is a 12-bit successive approximation register (SAR) A/D Converter. | ||
| + | |||
| + | ^ Pin ^ SIGNAL | ||
| + | | 10 | ADC_CH0 | 0~1.8V | ||
| + | | 12 | ADC_CH3 | 0~1.8V | ||
| + | |||
| + | ===== Get Raw ADC Value ===== | ||
| + | |||
| + | <WRAP important > | ||
| + | Replace the variable '' | ||
| + | </ | ||
| + | |||
| + | ```shell | ||
| + | $ cat / | ||
| + | ``` | ||
| + | |||
| + | The following uses Pin10 as an example. | ||
| + | |||
| + | ```shell | ||
| + | $ cat / | ||
| + | 4082 | ||
| + | $ cat / | ||
| + | 0 | ||
| + | ``` | ||
| + | |||
| + | Convert the raw ADC value to Voltage: | ||
| + | |||
| + | '' | ||