2024-09-24 01:31 AM
Hi All,
I need some help advise Please,
I have an application in which I need to read 4 external ADC chips over SPI this is all working fine(spi and ADC conversions)
The Application sample the ADC chips every 100uSec I have 4 buffers circular buffers one for each ADC,the Consumer of these ADC conversion values ask every 2msec a sample, so in fact the buffer contain 20 new samples every 2 mSec ,my confusion is what should I do with the 20 samples or what would be the best practise
for example add all 20 samples do an average and make the avg sample availble evry 2mSec when the consumer ask a new sample.
Please any ideas advise is highy appreciated
Regards
Pje
Solved! Go to Solution.
2024-09-24 05:57 AM
It's really dependent on your application. If you're monitoring a voltage and displaying it for the user, probably averaging all of them makes sense. If you're tracking a waveform, you would want to transmit all the values. If the user will only ask for a voltage every 1sec, or something else very slow, I see no reason not to report the average voltage over some small time frame. Otherwise, no need to monitor them so often.
2024-09-24 05:57 AM
It's really dependent on your application. If you're monitoring a voltage and displaying it for the user, probably averaging all of them makes sense. If you're tracking a waveform, you would want to transmit all the values. If the user will only ask for a voltage every 1sec, or something else very slow, I see no reason not to report the average voltage over some small time frame. Otherwise, no need to monitor them so often.
2024-09-24 09:01 PM
Dear TDK,
Thank you for your help much appreciated
Reagrds
Pje