AnsweredAssumed Answered

ADC different channel

Question asked by jourdan.cyril on Aug 2, 2011
Latest reply on Aug 3, 2011 by Ivan Ivanov
Hello,

I can do a ADC conversion for 1 channel. But I have a problem for using 2 channels.

I do this:
ADC_InitStructure.ADC_NbrOfChannel = 2;
ADC_RegularChannelConfig(ADC1, ADC_Channel_14, 1, ADC_SampleTime_13Cycles5);
 ADC_RegularChannelConfig(ADC1, ADC_Channel_15, 2, ADC_SampleTime_13Cycles5);

And then for get the value I do:
ADC_ResultOfConversion1 = ADC_GetConversionValue(ADC1);
ADC_ResultOfConversion2 = ADC_GetConversionValue(ADC1);

But ADC1 convert has 16 channels... How could I do for having the channel 15, rank 2 into ADC_ResultOfConversion2?

For me ADC_GetConversionValue(ADC1) is the same value as ADC_GetConversionValue(ADC1) ... How could I differenciate the two channels?

Thanks

Outcomes