cancel
Showing results for 
Search instead for 
Did you mean: 

ADC and SPI Advise needed

Pje
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
Pje
Associate III

Dear TDK,

Thank you for your help much appreciated 

Reagrds

Pje