> On Tue, May 22, 2012 at 8:22 AM, Matt Bennett <
.....mattpiclistKILLspam
@spam@hazmat.com>
> wrote:
>> If you've ever tried to do DSP type functions on a PIC24, you'll find
>> that
>> the standard libraries don't include any sort of filtering functions-
>> there are filtering functions for the dsPICs, but those functions are
>> using the DSP type features of that family- the code doesn't port.
>>
>> I understand it isn't optimal, but has anyone found decent fixed-point
>> FIR
>> (finite impulse response) code for the PIC24? I can generate the FIR
>> coeffecients. I've done a moving average filter [rectangular impulse
>> response], because it is very easy- but I'm just not happy with the
>> results. I could dive into 'Numerical Recipes in C,' but I'm hoping that
>> someone has done/found some slightly more optimized code (for example,
>> using the __builtin_xxx() type functions available in C30/XC16).
>>
>> Regards,
>>
>> Matt
>
> Matt,
> C30 produces pretty good assembly code. A simple FIR filter shouldn't
> have to be more complicated than rolling the x history and doing the
> MAC operations in standard C statements. If you need intense
> optimization to get it done efficiently then I would have to argue
> that you really need the dsPIC. The PIC24 running full speed should be
> able to do a LOT of FIR MACs per second, all without any special DSP
> instructions.
>
> I have derived and written FIR and IIR code if you need professional
> level help.