Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 6580 Lecture 7. Matlab VDSP EZ-Kit Board FirCoefs.mFirCoefs.cFirCoefs.hMain.cProject FilesFir.cFir.h FIR in C.

Similar presentations


Presentation on theme: "ECE 6580 Lecture 7. Matlab VDSP EZ-Kit Board FirCoefs.mFirCoefs.cFirCoefs.hMain.cProject FilesFir.cFir.h FIR in C."— Presentation transcript:

1 ECE 6580 Lecture 7

2 Matlab VDSP EZ-Kit Board FirCoefs.mFirCoefs.cFirCoefs.hMain.cProject FilesFir.cFir.h FIR in C

3 FirCoef.c float FirCoef[N] = { a 1, a 2,. a N, };

4 FirCoef.h Extern float FirCoef[ ];

5 fir.c //================================== // This function calculates an finite impulse response filter // It accepts as inputs: // x: input of type float // states: a pointer to float of the filter states, // the size of the states array should be // order, where order is the filter order // coefs: a pointer to float of the filter coefficients. // The size of this array should be order + 1. // order: The order of the filter. // Writtten by D.R.Judd 1/21/2003 //==================================== float fir( float x,// input to be filtered float *states, // states for filter delay line float *coefs,// coefs for filter a0,a1,…aN U32 order)// order of filter {. }

6 fir.h //================================== // This function calculates an finite impulse response filter // It accepts as inputs: // x: input of type float // states: a pointer to float of the filter states, // the size of the states array should be // order, where order is the filter order // coefs: a pointer to float of the filter coefficients. // The size of this array should be order + 1. // order: The order of the filter. // Writtten by D.R.Judd 1/21/2003 //==================================== float fir( float x,// input to be filtered float *states, // states for filter delay line float *coefs,// coefs for filter a0,a1,…aN U32 order);// order of filter

7 Measure Frequency Response PC1 PC2 Line Out (Green) EZ-Kit Board MIC In (Pink) PinkNoiseCorrelated.wav SIA Smaart USB

8 Debug Techniques Break Points Single Step Watch Windows Plots LEDs Test Files SIA Smaart

9 Break Points Double Click to the left of the line. Warning, if you halt on a break point that is not in the ISR, then you must clear the break point before continuing.

10 Single Step Step over Step into Step out of It is always a good idea to single step through new code. It usually saves time in the long run. Never single step when you are not in the ISR unless you disable interrupts.

11 Watch Windows View/Debug Windows/Locals View/Debug Windows/Expressions

12 Plots View/Debug Windows/Plot/New View/Debug Windows/Plot/Restore Warning, the more plots that you have and the larger they are, the slower your response time.

13 LEDs It is good to blink an LED when you are in the main loop, to make sure that it does not stay in the ISR all the time. It is good to blink an LED when you are in the ISR, to make sure interrupts are happening. Warning, blink slowly.

14 Test Files A good example of a test file for Lab 2 would be a different FilterCoefs.c file with all zeros for the coefficients except one. Test files are algorithm dependent.

15 SIA Smaart Very good for measuring frequency responses real time. (RTA) Good for measuring Transfer Functions.

16 Remember to use Class coding standards


Download ppt "ECE 6580 Lecture 7. Matlab VDSP EZ-Kit Board FirCoefs.mFirCoefs.cFirCoefs.hMain.cProject FilesFir.cFir.h FIR in C."

Similar presentations


Ads by Google