Digital Signal Processing Reference
In-Depth Information
tion can be fed back (from the DSK output) as data or as an audio signal to control,
for example, external light effects. Alternatively, it can be fed back to the host PC
for further processing, such as calculating beats per minute. RTDX can then be used
to provide an interface between the PC host and the DSK (see Chapter 9).
Build this project as beatdetector and verify that this detection scheme (with
several different types of music) recognizes the drum in most cases, with very few
false positives.
10.3 FIR WITH RTDX USING VISUAL C
++
FOR TRANSFER OF
FILTER COEFFICIENTS
This project implements an FIR filter using VC
with RTDX to transfer the coef-
ficients. Chapters 4 and 9 discuss FIR filters and RTDX with VC
++
, respectively. All
the appropriate files for this project are on the CD in the folder rtdx_vc_FIR.
Figure 10.7 shows the C source program rtdx_vc_FIR.c that runs on the DSK.
It implements the FIR filter, and creates and enables an input channel through
RTDX to read a new set of coefficients. These coefficients are transferred through
RTDX from the PC host to the C6x running on the DSK.
++
1. Build this project as rtdx _ vc _ FIR . A configuration ( .cdb ) file is created to set
INT11. Note that the project includes several autogenerated support files
including the linker command file. The init/comm. file is included in the project
for real-time input and output. The vector file is not included since INT11 is
set within the configuration file. See Example 9.2.
Within CCS, load and run the executable file. Select Tools
Æ
RTDX
Æ
Configuration control and enable RTDX (check it).
2. Run the Visual C
application file included in the folder
rtdx_vc_FIR\VC_FIR_RTDX\Debug. A message for the user to load a
coefficient file pops up, as shown in Figure 10.8. Load the coefficient file
LP600.cof , looking in the folder rtdx_vc_FIR . This coefficient file was
designed with MATLAB and used in Example 4.2 to implement a lowpass
FIR filter with a cutoff frequency at 600 Hz. Verify this result.
Load LP1500.cof and LP3000.cof, which represent FIR lowpass filter with
81 coefficients and with cutoff frequencies at 1500 and 3000 Hz, respectively.
Verify that these FIR filters can be implemented readily.
++
The coefficient files are transferred in real time to the C program running on the
DSK, using the function RTDX_read( ) in Figure 10.7. The coefficients are stored
in the buffer RtdxBuffer , along with N that represents the number of coefficients
(81) as the first value in the coefficient file (the lowpass coefficient files in the
example FIR3LP have been modified for this project). Experiment with different
sets of coefficients.
Search WWH ::




Custom Search