This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Previous revision | ||
products:sbc:common:applications:gpio:adc [2022/12/21 21:25] ivan created |
products:sbc:common:applications:gpio:adc [2022/12/21 21:28] (current) ivan |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== 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: | ||
- | |||
- | '' | ||