Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sampling analog values at 2 kHz

Status
Not open for further replies.

natraj20

Member level 3
Joined
Oct 28, 2010
Messages
65
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Florida
Activity points
1,769
I would like to sample analog values from a pressure at 2 kHz and would like to have a small buffer for the latest values (say 100). So at each sample point, the latest sampled value should replace the oldest value in the buffer. At each instant, i need the average of this 100 values as the result but averaging 100 values is a lot of time especially when the results should be in real time and the sampling rate is high.

Any suggestions on reducing the time delay introduced by the calculation or efficient way of creating a buffer ??
 

Nice one Joannes so that the calculation will be replaced by something like this,

new average = (total + latest value - oldest value ) / 100

Is there anyway i could avoid this floating point division ??
 

If you use 128 values, you only need a right shift by 7 bits.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top