eric
I hope this doesn't pull the thread OT, but I do not quite see what you are doing in Post #486:
View attachment 110718
The first value (68) is easy to get. With some crazy assumptions, I get the next value. But I cannot get the third value. Does it ever settle to 682?
My first impression from your code was a simple moving average (FIR):
Code:
'sum all 10 values of the ring bfr
For x = 0 To 9
sum = sum + mybfr(x)
Next x
average = sum / 10
But there seems more to it than that. My main reference for the math is this:
https://www.analog.com/media/en/training-seminars/design-handbooks/MixedSignal_Sect6.pdf Specifically, I am referencing Figure 6.8 in that link:
View attachment 110719
Can you explain, perhaps by a worked example, how you get the highlighted value? Also, why it doesn't seem to settle on 682?
Regards, John