Calculating average values of ADCs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Calculating average values of ADCs

899件の閲覧回数
Alexshea
Contributor III

@xiangjun_rong Hi, I tried what you said to calculate average values of adc channels, but when I use for loops, I don't receive any adc values. You told me to set #define TOTAL_AVERAGE_NUMBER 2, but even setting it 2 didn't help. I don't use adc interrupt in this code, since  all the 8 adc channels are used and it seems that the for loops don't work either. Could you please once again check my code and help me resolve this issue.

Thanks in advance, 

Alex

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

852件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Sorry for the delay.

I suggest you use interrupt mode to read ADC result instead of polling mode, the ADC polling mode wastes a lot of time for the core.

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信

845件の閲覧回数
Alexshea
Contributor III

@xiangjun_rong Hi, thanks for the answer. Well, I've tried interrupt before, but I was able to work with only 2 ADCs and when I activated the third ADC the code stopped and locked and didn't execute. I didn't know what to do. I was wondering if you modify my code and add interrupt I can't work with interrupt while using all ADC channels myself

0 件の賞賛
返信