14 Replies Latest reply on May 5, 2016 5:13 PM by userc_20416

    Problem using more than one ADC

      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 );


          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.

       

      Apology for re posting Using more than one ADC input in WICED wifi board Problem but my problem is exactly.

      That's why i'm re posting the problem.

       

      Regards,

      Prashant