- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to use more than one ADC input in my application. I could not get all the ADC inputs sampled independent of each other.
I have connected ADC_1 to 3.3V and ADC_3 to ground for testing.
Here is my code snippet.
..
wiced_adc_init( WICED_ADC_1, 5 );
wiced_adc_init( WICED_ADC_3, 5 );
sntp_start_auto_time_sync( 1 * DAYS );
while(1) {
wiced_adc_take_sample(WICED_ADC_3, &adc3_value );
WPRINT_APP_INFO(("adc3 %d\r\n,", adc3_value));
wiced_adc_take_sample(WICED_ADC_1, &adc1_value );
WPRINT_APP_INFO(("adc1 %d,\r\n", adc1_value));
}
adc3_value and adc1_value are same and the value printed is 0 (0V)
Printed adc*value depends on which ADC is initialized latest.
Could it be a driver code issue?
Also I could not get the single step debug mode working to understand more on the issue.
Any help or pointers will be useful.
Thank you,
Eravanan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For ADC reading check out this blog post, ADC Setup and Read to setup and read ADC values.
I have updated the sample application and it reads the values.
For debugging up the check the QSG, ..\doc\WICED-QSG202-R.pdf, in WICED SDK. Also the blog posts, Creating and/or Editing Debug Configurations.
Seyhan