Calculating average values of ADCs

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Calculating average values of ADCs

1,050 次查看
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 回复数

1,003 次查看
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 项奖励
回复

996 次查看
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 项奖励
回复