This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:edge2:applications:gpio:adc [2022/12/06 03:49] nick |
products:sbc:edge2:applications:gpio:adc [2022/12/06 21:03] (current) hyphop [Hardware Information] |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== Edge2 ADC ====== | ====== Edge2 ADC ====== | ||
| - | |||
| - | |||
| - | {{page> | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | The previous part of this page introduces | + | This documentation will introduce the usage of ADC on the Edge2 IO board. |
| <WRAP important > | <WRAP important > | ||
| - | For Edge2, in order to use the ADC function, you need to attach the IO extension | + | For Edge2, in order to use the ADC function, you need to attach the Edge2 IO board. |
| </ | </ | ||
| - | ===== ADC Information ===== | + | ===== Hardware |
| - | <WRAP info > | + | The ADC on the Edge2 IO board is a 12-bit |
| - | The ADC is an 12-bit | + | |
| - | </WRAP> | + | ^ Pin ^ Voltage |
| + | | 9 | 0~1.8V | ||
| - | | | ||
| - | ^ Edge2 | ADC_CH2 | ||
| - | ===== ADC conversion | + | ===== Get Raw ADC Value ===== |
| - | + | ||
| - | Use the following command to view the device node and read the ADC conversion value. | + | |
| ```shell | ```shell | ||
| - | $ cd && ls / | ||
| - | buffer | ||
| - | dev in_voltage3_raw | ||
| - | in_voltage0_raw | ||
| - | in_voltage1_raw | ||
| $ cat / | $ cat / | ||
| - | 1 | + | 4082 |
| + | ``` | ||
| - | ``` | + | Convert the raw ADC value to Voltage: |
| + | |||
| + | '' | ||