<< Chapter < Page Chapter >> Page >

How would output channel 2 be different if the input had a DC offset?

the converters on the board are AC coupled and cannot pass DC signals.

Configure function generator and oscilloscope

Set the amplitude on the function generator to 1.0 V peak-to-peak and the pulse shape to sinusoidal. Adjust the function generator so that it expects a high impedance load. The sequence of button presses to accomplish this on the function generator in the lab is Shift ->Enter ->Right ->Right ->Right ->Down ->Down ->Right ->Enter .

Make sure the oscilloscope is set to 1M impedance. This can be accomplished by pressing channel 1 or 2 and then selecting 1M Ohm from the Imped menu.

Observe the frequency response of the filter by sweeping the input signal through the relevant frequency range. What is the relevant frequency range for a DSP system with a sample rate of 48 kHz?

Characterize filter response

Based on the frequency response you observe, characterize the filter in terms of its type (e.g., low-pass, high-pass,band-pass) and its -6 dB (half-amplitude) cutoff frequency (or frequencies). It may help to set the trigger on channel2 of the oscilloscope since the signal on channel 1 may go to zero.

Step 5: re-assemble and re-run with new filter

Once you have determined the type of filter the DSP is implementing, you are ready to repeat the process with adifferent filter by including different coefficients during the assembly process.There is a second set of filter coefficients already in your project folder. In Windows Explorer, navigate to U:\workspace\ece420\filter and do the following:

  • Rename coef.asm to coef1.asm
  • Rename coef2.asm to coef.asm

Repeat the assembly and testing process with the new filter by repeating steps required to build ( Step 3 ) and execute ( Step 4 ) the code. (You will need to rebuild filtercode.asm manually by right-clicking this file and selecting "Build Selected File". Afterwards, rebuild the project. There is a bug in CCSv5's Makefile generation that fails to make filtercode.asm depend on changes to coef.asm")

Just as you did in Step 4 , determine the type of filter you are running and thefilter's -6 dB point by testing the system at various frequencies.

Step 6: check filter response in matlab

In this step, you will use MATLAB to verify the frequency response of your filter by copying the coefficients from theDSP to MATLAB and displaying the magnitude of the frequency response using the MATLAB command freqz .

View coefficients in dsp memory

The FIR filter coefficients included in the file coef.asm are stored in memory on the DSP. To view the contents of the DSP memory, first suspend any running program by going to Run>Suspend and then select View>Memory Browser .

In the panel that comes up, there is a text box for you to type in the name of the variable that you are interested in viewing. This variable name is actually a mnemonic for a memory address. In the case of our coefficients, the mnemonic coef1 is used to point to the starting address of our coefficients. The memory content can be displayed in many different formats. In the drop-down box, choose 16-Bit Signed Int .

Make sure you understand where the coef1 label comes from. [Hint:] Select View>C/C++ Projects and double click on filtercode.asm to view the source code.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 420 fall 2013. OpenStax CNX. Sep 26, 2013 Download for free at http://cnx.org/content/col11560/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 420 fall 2013' conversation and receive update notifications?

Ask