This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
products:sbc:vim-5:applications:gpio:adc [2026/09/14 03:59] 127.0.0.1 external edit |
products:sbc:vim-5:applications:gpio:adc [2026/09/14 04:18] (current) nick |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{indexmenu_n> | {{indexmenu_n> | ||
| - | ====== | + | ====== |
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | This document aims to guide you on how to use the ADC (Analog-to-Digital Converter) interface on the GPIO pins of the Khadas VIM4 SBC. The ADC interface allows you to convert analog signals into digital values, providing you with flexibility to connect analog sensors and devices on the VIM4. | + | This document aims to guide you on how to use the ADC (Analog-to-Digital Converter) interface on the GPIO pins of the Khadas VIM4 SBC. The ADC interface allows you to convert analog signals into digital values, providing you with flexibility to connect analog sensors and devices on the VIM 5. |
| ===== Hardware Information ===== | ===== Hardware Information ===== | ||
| Line 12: | Line 12: | ||
| ^ Pin ^ SIGNAL | ^ Pin ^ SIGNAL | ||
| - | | 10 | + | | 10 |
| - | | 12 | ADC_CH3 | 0~1.8V | + | | 12 | ADC_CH3 | 0~1.8V |
| - | ===== Get Raw ADC Value ===== | + | ===== Get ADC Value ===== |
| <WRAP important > | <WRAP important > | ||
| - | Replace the variable '' | + | Replace the variable '' |
| </ | </ | ||
| ```shell | ```shell | ||
| - | $ cat / | + | $ cat / |
| ``` | ``` | ||
| Line 28: | Line 28: | ||
| ```shell | ```shell | ||
| - | $ cat / | + | $ cat / |
| - | 4082 | + | 1800 |
| - | $ cat / | + | $ cat / |
| - | 5 | + | 0 |
| ``` | ``` | ||
| Convert the raw ADC value to Voltage: | Convert the raw ADC value to Voltage: | ||
| - | '' | + | '' |