Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:applications:gpio:adc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:applications:gpio:adc [2022/12/02 08:04]
ivan [ADC conversion]
products:sbc:common:applications:gpio:adc [2022/12/21 21:28] (current)
ivan
Line 1: Line 1:
-~~tag>Edge2 ADC~~ 
- 
-====== Edge2 ADC ====== 
- 
- 
-{{page>products:sbc:common:applications:gpio:adc&noheader}} 
- 
-===== Introduction ===== 
- 
-The previous part of this page introduces ADC related information.The second part guides you to obtain ADC conversion values. 
- 
-<WRAP important > 
-For Edge2, in order to use the ADC function, you need to attach the IO extension board. 
- 
-</WRAP> 
- 
-===== ADC Information ===== 
- 
-<WRAP info > 
-The ADC is an 12-bit Successive Approximation Register (SAR) A/D Converter.It converts the analog input signal into 12-bit binary digital codes at maximum conversion rate of 1MSPS with 20MHz A/D converter clock. The input range is typically 0V to 1.8V.  
- 
-</WRAP> 
- 
- 
-|            ADC        PIN  ^   GPIO Name  ^ 
-^  Edge2    |  ADC_CH2        SARADC_IN4  | 
- 
-===== ADC conversion ===== 
- 
-Connect the expansion board correctly, and input the voltage value between 0V and 1.8V for pin 9.Throughdevice.By the following command.Read the ADC conversion value. 
- 
-```shell 
-$ cd /sys/bus/iio/devices/iio:device0 
-$ ls 
-buffer           in_voltage2_raw  in_voltage6_raw   of_node        trigger 
-dev              in_voltage3_raw  in_voltage7_raw   power          uevent 
-in_voltage0_raw  in_voltage4_raw  in_voltage_scale  scan_elements 
-in_voltage1_raw  in_voltage5_raw  name              subsystem 
-$ cat in_voltage4_raw                                             //pin9 connect GND 
-1                                                  
- 
-``` 
  
  
Last modified: 2022/12/02 08:04 by ivan