Quantcast
Channel: Cypress Semiconductor - PSoC 4 Architecture
Viewing all articles
Browse latest Browse all 761

SAR ADC reading random values between 1430-1460

$
0
0

Hi 

 I am trying to read an analog signal with the SAR ADC. In the components (Analog), I plug in the analog signal wire directly to the + input of SAR ADC and use (Vss) as - input. 

 I am uisng external VRef (2.000 V) in the config parameter. 

 I am definite that I am getting analog signal from my sensor. However, my ADC reading is some random noise between 1430 - 1450. 

 

 I am using these commands: 

void init()

{ADC_Start();}

 

void readADC()

{

    ADC_StartConvert();
    ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
    val = ADC_GetResult16(0);

}

 

Please help me out if I am missing some commands.

Thanks

Chandra 


Viewing all articles
Browse latest Browse all 761

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>