AnsweredAssumed Answered

problem to read adc1 channel 8 and 9 at the same time

Question asked by armoun.mohamad on May 11, 2014
Latest reply on May 14, 2014 by Clive One
hi guys.
i want to read adc1 channel 8 and 9 at the same time .i mean in main loop at first read adc1 channel 8 and then read channel 9. i set this channel for PB0 and PB1.
you know when i want to read from ADC i don't have option for channel i just have to send ADC number as parameter to my function :
int adc_convert(ADC_TypeDef* ADCx){
 ADC_SoftwareStartConv(ADCx);
 while(!ADC_GetFlagStatus(ADCx, ADC_FLAG_EOC));
 return ADC_GetConversionValue(ADCx);
}
so how can i read this 2 channel separately . 
how about putting this two channel in adc1 and adc2;
and in this case just adc2 works.because i initialized adc2 after 1.


any idea would be grate.



Outcomes