DSP using the MCF5213

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DSP using the MCF5213

6,603件の閲覧回数
airswit
Contributor III
hey guys,

i was wondering if you could point me in the direction of figuring out how to implement a digital filter using the MCF5213. As a side project, I would like to be able to use the processing power of this controller, along with a SPI D/A to be able to implement some IIR filters, or maybe a simple FIR. I have seen somewhere a user manual here at freescale for a library package, but havn't seen the actual files anywhere. Also, the user manual, far as i can tell, does not tell the structure of the IIR filter, just says that you inptu a0,b0,a1,b1....

any help or pointers would be great!

Thanks,
Trevor
ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,351件の閲覧回数
DavidS
NXP Employee
NXP Employee

Actually Freescale does have filter examples (and source) on the web site....we just like to make you look really hard for them :smileywink:

The IIR, FIR, and FFT examples work with the ColdFire MAC and eMAC modules.

Note that the code was tested on the MCF5282 specifically.

Documentation: http://www.freescale.com/files/32bit/doc/ref_manual/CFLMOPM.pdf 

Source code: https://www.freescale.com/webapp/Download?colCode=CFLMOPMSW&prodCode=MCF5282&nodeId=0162468rH3YTLC00... 

Regards, DavidS

0 件の賞賛
返信

1,351件の閲覧回数
rathben
Contributor III
please fix the broken link to the macro library code given in the previous post - thanks!
0 件の賞賛
返信

1,351件の閲覧回数
airswit
Contributor III
hrm..i was hoping that they had some algorithms already made up. I just finished up a class teaching the basics of dsp, ie how to derive transfer functions, stability, and all that, but didn't have much on implementation, especially in software. I don't really have time to write my own software to do all of the algorithms, i was just hoping that there were some free programs that could run on the coldfire out there.

Thanks,

Trevor
0 件の賞賛
返信

1,351件の閲覧回数
J2MEJediMaster
Specialist I
Here's an archive with a FIR filter written for the Motorola DSP56824. The code also has the coefficients to implement a low-pass and a high-pass filter. The program ran on a board that had 8-bit audio input and output. You'd compile the code for, say the low-pass filter, and then pipe audio through the board, unfiltered. Hit a button and the filter would kick in, and you'd hear the audio change, with the high frequencies blocked. That made for a pretty cool real-time demo. It may not be the best code in the world, but perhaps it can serve as a starting point and it's field-tested. :smileyhappy:

The FIR filter is written all in C, so it should be easy to adapt to your particular DSP.

---Tom

Message Edited by J2MEJediMaster on 05-17-2006 03:25 PM

 

DSP Filter.zip

Message Edited by t.dowe on 2009-09-02 05:16 PM
0 件の賞賛
返信

1,351件の閲覧回数
rocco
Senior Contributor II
Hi, Trevor:

I'm not sure where to start, it's such a big topic . . .

I have implemented IIR filters in the Motorola 24 bit DSPs, and I've done FIR filters in the DSPs, as well as in the HC05s and HC08s. The large memory space of the ColdFire should allow for a wide range of FIR filters.

I have a FIR algorithm that uses only a subtract, add and replace for each iteration (NO multiplies or divides). However, it uses a simple box for windowing, so it's cutoff is not very sharp. I use it for motor control, not something as demanding as audio.

IIR filters are much harder to design than FIR filters, but you can get pretty high performance with a low memory and moderate cpu footprint. designing them means computing the coefficients (a0, b0, a1, b1 . . . ) which requires some serious math. I know of three manual methods of computing the coefficients, but all require calculus. I have a MathCad document/program that calculates the order of the IIR filter and the coefficients for me, using one of those methods. I can send it, if you like.

I can point you to some of the filter appnotes for the DSP56xxx, but I'm not sure if they would be much use, since they heavy with DSP code, but light in theory.
0 件の賞賛
返信