User`s guide
5 Exporting F ilter Coefficients from FDATool
• Click Select target to open the Selection Utility: Embedded IDE Link
CC dialog box.
• From the list of boards and list of processors, select the board name
and proce ssor name to use.
• Click Done to set the DSP B oard # and DSP Processor # va lues.
9 Click Generate to generate the ANSI header file. FDATool prompts you
for a file name and location to save the generated header file.
The default location to save the file is your MATLAB working directory.
The default file name is
fdacoefs.h.
10 Click OK to export the header file to the CCS editor.
If CCS IDE is not open, this step starts the IDE .
The e xport process does not add the file to your active project in the IDE.
11 Drag your generated header file into the project that implements the filter.
12 Add a #include statement to your project source code to include the new
header file when you build your project.
13 Generate a .out file and load the file into your processor. Loading the file
allocates locations in static memory on the processor and writes the filter
coefficients to those locations.
To see an example header file, refer to “Review ing ANSI C Header File
Contents” on page 5-12.
Reviewing ANSI C Header File Contents
The following program listing shows the exported header (.h) file that
FDATool generates. This example show s a direct-form II filter th at uses fi ve
second-order sections. The filter is stable and has linear phase.
Comments in the file describe the filter structure, number of sections,
stability, and the phase of the filter. Source code shows the filter coefficients
and variables associated with the filter design, such as the numerator length
and the data type used to represent the coefficients.
5-12