cancel
Showing results for 
Search instead for 
Did you mean: 

problem in config two channels of ADC 1?

mayurr
Associate II
Posted on October 14, 2008 at 23:54

problem in config two channels of ADC 1?

2 REPLIES 2
mayurr
Associate II
Posted on May 17, 2011 at 12:45

hi ,

i have to use two adc channels ,

one is used to measure the temperature that channel is adc channel 17,

and other channel is adc 14 for other purpose.

channel 17 is internal channel ,by sending adc count on UART i can see adc count of channel 17 , also same procedure when i am applying for channel 14 then i can see adc count of channel 14 , but now i want to see both adc count one after another .

means how to config these two channels?

i have seen example 5 but it is with DMA , i want do it without DMA.

So if any one have an idea how to config two chanels plz reply ?

Is ''adc start conversion'' i have to give after the detection of ''EOC flag SET''? to start again next scan of ADC ?

andy239955_stm1
Associate II
Posted on May 17, 2011 at 12:45

I haven't tried using the adc's without DMA, but you should be able to use most of the same setup code (defining a sequence of measurements) then use EOC conversion interrupts to read the values (or poll the EOC bit if you don't have anything else you need to be doing while you wait).

You should only issue one start for each pair of readings. Start always starts a sequence of conversions.

---

There might be an easier way using the ''injected'' channel stuff but the documentation is very confusing. The injected channels read to their own registers so you would not have to read either value until after both are acquired. I couldn't use the injected channel stuff as I am converting 6 channels.

Good luck.