Summary: You will implement a multirate system that includes three fininte impulse response filters. The sample-rate compression and expansion factors can be controlled in real time using a MATLAB graphical user interface.
addm (add to
memory) and bc (branch conditional)
instructions. You may also find the banz
(branch on auxiliary register not zero) and the b
(branch) instruction useful.
mrategui at the MATLAB
prompt. A figure should automatically open up with a slider
on it; adjusting the slider changes the compression and
expansion factor sent to the DSP.
hold. Therefore,
unless you have changed the serial portion of the given
code, you can find the last compression and expansion factor
set by the GUI in this location. You need to modify your
code so that each time a new number is received on the
serial port, the compression and expansion factor is
changed. If a "1" is received on the serial port, the
entire system should run at the full rate; if a "10" is
received, the system should discard nine samples between
each sample processed at the lower rate.
READSER and WRITSER
macros, which are used to read data from and send data to
the serial port, overwrite AR0,
AR1, AR2, and AR3
registers, as well as BK and the condition flag
TC. You must therefore ensure that these
registers are not used by your code, or that you save and
restore their values in memory before you call the
READSER and WRITSER macros. This
can be done using the mvdm and
mvmd instructions. The serial macros set up
the AR1 and AR3 each time they are
called, so there is no need to change these registers before
the macros are called.
READSER and
WRITSER macros can be found in Core File: Serial Port Communication
Between MATLAB and TI TMS320C54x.