1 / 16

ECE 6580 Lecture 7

ECE 6580 Lecture 7. FirCoefs.m. FirCoefs.c. FirCoefs.h. Project Files. Main.c. Fir.h. Fir.c. FIR in C. EZ-Kit Board. Matlab. VDSP. FirCoef.c. float FirCoef[N] = { a 1 , a 2 , . . . a N , };. FirCoef.h. Extern float FirCoef[ ];. fir.c.

samanthal
Download Presentation

ECE 6580 Lecture 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 6580 Lecture 7

  2. FirCoefs.m FirCoefs.c FirCoefs.h Project Files Main.c Fir.h Fir.c FIR in C EZ-Kit Board Matlab VDSP

  3. FirCoef.c float FirCoef[N] = { a1, a2, . . . aN, };

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

  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

More Related