@xiangjun_rong Hi, I used the code that you recommended for calculating the average temperature. However, after using that now I don't receive any temperature. Could you please check the code once again and help me resolve that problem. I added the whole project as you asked the last time.
Hi,
you use the code:
#define TOTAL_AVERAGE_NUMBER 200
for (uint16_t i=0; i<TOTAL_AVERAGE_NUMBER; i++)
{
uivoltage=HW_ADC_Read(0);
temp=calcTemp(uivoltage);
totalTemp+=temp;
}
The above code takes a lot of time so that the core has not time to handle the interrupt.
Pls try to change
#define TOTAL_AVERAGE_NUMBER 2
and have a try.
BR
XiangJun Rong
@xiangjun_rong Hi, I tried what you said, but even setting #define TOTAL_AVERAGE_NUMBER 2 didn't solve the problem