On Fri, 20 Sep 2002, Olin Lathrop wrote:

{Quote hidden}> > An FIR filter, or finite impulse response filter, is a fancy name for a

> > dot product between two vectors. Or in C:

> >

> > sum = 0;

> > for(i=0; i<LENGTH; i++)

> > sum = sum + weights[i] * data[i];

> >

> > In other words, you have two arrays "weights" and "data". They're

> > multiplied together element by element and the resulting products are

> > added together.

>

> That's called a "convolution", and is the basis for much digital signal

> processing. This is exactly the algorithm that DSPs are optimized for. In

> a DSP you want to do each multiply-accumulate in one cycle, including the

> address advancing and loop termination check.

Well... technically it's correlation, but yeah you're right.

{Quote hidden}> > Now the challenge is this:

> >

> > Suppose the filter weights and the data samples are 8-bit numbers stored

> > in RAM. The filter weights started off as constants, but since you were

> > clever, you mixed the calibration data with filter weights. The data

> > resides in a circular buffer. Suppose the FIR filter has 8 taps (i.e.

> > there are 8 elements in the Weights vector) and that the circular data

> > buffer can hold 16 samples.

> >

> > How efficiently can this be implemented in assembly:

>

> Microchip has done this sort of thing for the 18 series utilizing the

> hardware multiplier. They were distributing this code along with a bunch of

> other digital filtering stuff on a small CD about a year ago. I sorta

> remember it was called something like "Filter Lab". The convolution code

> was particularly clever in that it actually did 9 (or was it 10) bit

> multiplies with some neat tricks.

Great! Maybe their code will win the challenge (but I doubt it -

especially now that Tony K. is interested).

Scott

--

http://www.piclist.com hint: The list server can filter out subtopics

(like ads or off topics) for you. See http://www.piclist.com/#topics