KŸbek Tony wrote: > I have an recursive moving average filter, 52 points with 3 bytes > each, which works ok. However the ram usage is 'a bit' high :-) ( > almost the entire two top ram banks on my 16f876, ) > > Are there any other, more space conservatory, techniques one could > use to accomplish the same filtering ? Tony: The usual way to solve this problem is this: TEMP = AVERAGE * WIDTH TEMP = TEMP - AVERAGE TEMP = TEMP + NEW_SAMPLE AVERAGE = TEMP/WIDTH If you do it that way, you need only enough storage for TEMP, AVERAGE, and your NEW_SAMPLE. If you set WIDTH to a power of 2, the multiplication and division become trivial; if you pick a value of 256, the multiplications and divisions don't even require any code. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - San Diego, California === http://www.geocities.com/SiliconValley/2499