In this exercise, you will program in the DSP's assembly language to create FIR filters. Begin by studying the assembly code for the basic FIR filter filter.asm.
| filter.asm |
|---|
|
filter.asm applies an FIR filter to the signal
from input channel 1 and sends the resulting output to output
channel 1. It also sends the original signal to output
channel 2.
First, create a work directory on your network drive for the
files in this exercise, and copy filter.asm
and core.asm
into it. Then use MATLAB to generate two 20-tap FIR
filters. The first filter should pass signals from 4 kHz to 8
kHz; the second filter should pass from 8 kHz to 12 kHz. For
both filters, allow a 1 kHz transition band on each edge of
the filter passband. To create these filters, first convert
these band edges to digital frequencies based on the 44.1 kHz
sample rate of the system, then use the MATLAB command
remez to generate this filter; you can type
help remez for more information. Use the
save_coef command to save each of these filters
into different files. (Make sure you reverse the vectors of
filter coefficients before you save them.) Also save your
filters as a MATLAB matrix, since you will need them later to
generate test vectors. This can be done using the MATLAB
save command. Once this is done, use the
freqz command to plot the frequency response of
each filter.








