Digital Signal Processing Reference
In-Depth Information
. The radix-4
FFT support functions for generating the index for digit reversal, and for digit rever-
sal, were used in Chapter 6. The complex radix-4 FFT function cfftr4_dif.c
is also on the CD (the ASM version was used in Chapter 6). Note that the real
and imaginary components of the input are consecutively arranged in memory (as
required by the FFT function). Digit reversal is performed on the resulting FFT
since it is scrambled and needs to be resequenced. After the FFT magnitude is cal-
culated and stored in output_buffer , it is sent to MATLAB through an output
RTDX channel.
The project uses DSP/BIOS only to set interrupt INT 11 using the ( .cdb ) con-
figuration file (see Example 9.3). As a result, a vector file is not required. The BSL
file needs to be added (the support files for RTDX and CSL are included in the
autogenerated linker command file, which must be added to the project by the user).
Build this project within CCS as rtdx _ vc _ FFTr4 . Within CCS, select Tools
the PC host for plotting (only). RTDX is achieved using Visual C
++
Æ
RTDX and configure the buffer size to 2048 (not 1024), and then enable RTDX
(check it). From the configuration ( .cdb ) file, select Input/Output
RTDX. Right-
click for properties to increase the buffer size from 1024 to 2056. Load and run the
( .out ) file. Input a 2-kHz sine wave with an approximate amplitude of 1/2 V p-p.
The output from the DSK is like a loop program.
Æ
Visual C
Component
Execute/run the application file rtdxFFT.exe located in the VC
++
folder
rtdx_vc_FFTr4\rtdxFFT (within debug ). Figure 10.10 b will pop up, followed
by the FFT magnitude plot from MATLAB. Verify that the FFT of the 2-kHz sine
wave output is plotted within MATLAB, as in Example 9.5.
The Visual C
++
file rtdxFFTDlg.cpp includes the code section for MATLAB
to set the sampling rate and plot the received data. It is located in the dialog class
within the thread
++
UINT CRtdxFFTDlg: : RTDXThreadFunction(LPVOID lpvoid)
Re-create the executable (application) file. Launch Microsoft Visual C
++
and select
File
Æ
Open Workspace to open rtdxFFT.dsw . Build and Rebuild All.
10.6 SPECTRUM DISPLAY THROUGH EMIF USING A BANK OF 32 LEDs
This mini-project takes the FFT of an input analog audio signal and displays the
spectrum of the input signal through a bank of 32 LEDs. The specific LED that turns
on depends on the frequency content of the input signal. The bank of LEDs is con-
trolled through the external memory interface (EMIF) bus on the DSK. This EMIF
bus is a 32-bit data bus available through the 80-pin connector J4 on board the DSK.
The FFT program in Chapter 6 using TI's optimized ASM-coded FFT function
is extended for this project. Figure 10.11 shows the core of the program that imple-
Search WWH ::




Custom Search