<< Chapter < Page | Chapter >> Page > |
Now, load your assembled filter file onto the DSP by
selecting
Load Program
from the
File
menu. Finally, reset the DSP again, and
execute the code by selecting
Run
from the
Debug
menu.
The program you are running accepts input from input channel 1 and sends output waveforms to output channels 1 and 2 (thefiltered signal and raw input, respectively). Note that the "raw input" on output channel 2 may differ from the actualinput on input channel 1, because of distortions introduced in converting the analog input to a digital signal and thenback to an analog signal. The A/D and D/A converters on the six-channel surround board operate at a sample rate of 44.1kHz and have an anti-aliasing filter and an anti-imaging filter , respectively, that in the ideal case would eliminate frequency content above 22.05kHz. The converters on the six-channel board are also AC coupled and cannot pass DC signals. On the basis of this information, what differences do you expect tosee between the signals at input channel 1 and at output channel 2?
Set the amplitude on the function generator to 1.0 V peak-to-peak and the pulse shape to sinusoidal. Observe thefrequency response of the filter by sweeping the input signal through the relevant frequency range. What is therelevant frequency range for a DSP system with a sample rate of 44.1 kHz?
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.
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.Copy a second set of FIR coefficients over to your workingdirectory with the following:
copy coef.asm coef1.asm
copy v:\ece420\54x\dsplib\coef2.asm coef.asm
You can now repeat the assembly and testing process with the
new filter using the
asm
instruction at the
DOS
prompt and repeating the steps required to
execute the code discussed in
Step
4 .
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.
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
.
The FIR filter coefficients included in the file
coef.asm
are stored in memory on the DSP
starting at location (in hex)
0x1000
, and each
filter you have assembled and run has eight coefficients.To view the filter coefficients as signed integers, select
the
Memory
option from the
View
menu to bring up a
Memory Window
Options
box. In the appropriate fields, set the
starting address to
0x1000
and the format to
16-Bit Signed Int
. Click "OK" to open a memory
window displaying the contents of the specified memorylocations. The numbers along the left-hand side indicate
the memory locations.
Notification Switch
Would you like to follow the 'Ece 320 - spring 2003' conversation and receive update notifications?