The dsPIC Filter Designer plug-in integrates dsPIC Filter Designer application by launching it form MPLAB and lets the user for design the filter. During the generation of code for the Filter Design the all generated files will get added to the active project of MPLAB.
dsPIC Filter Designer Application generates assembly language(.s) file for Microchip’s dsPIC30/33 devices.
Launch dsPICFD
Invokes the dsPICFD application from the path specified in Settings.
To Launch the dsPIC FD it requires an active project. It will make a copy and add the specific dependency file such as FIR_Filter.s, IIRT_Filter.s and IIRC_Filter.s from the dsPIC Filter Design application directory to the active project.
Settings
Contains dsPIC FD installed path information.
Close
Unloads the dsPICFD from MPLAB if dsPICFD application is open I will close the application.
Help
Loads the Help window
Toolbar provides Launch dsPICFD, Settings, Close and Help buttons for easy access.
The dsPIC FD system was designed to be intuitively easy to use without sacrificing any of the powerful design capabilities required for a sophisticated engineering application. The top menu bar provides all the necessary options to design filters and will save previously inputted data thus allowing specifications to be changed with the minimum of effort. To alter a field, simply move the cursor into the relevant field using the mouse or Enter keys and re-enter the desired data
There are two Code Generation options - generating C Code or Microchip’s dsPIC30/33
assembly language code.
C Code can be created for any filter. A fully documented C program which can be used as either a subroutine or main program is generated. This C program uses two include files: qed_filt.c and qed_cgen.h. The filter routines are in qed_filt.c and the function prototypes and structure definitions are defined in qed_cgen.h.The generated C code is most appropriately used in a floating point DSP or a personal
computer.
The dsPIC FD system supports optimized assembly language code generation specifically for Microchip’s dsPIC30/33 processor. Select the dsPIC30/33 option as shown below.
The dsPIC30 FD code generator always creates an assembler file, *.s, where the filename is specified by the user in the file save dialog box.
This file contains the assembly definition of the filter structure, the filter coefficients and a code fragment showing how to call the generalized filter routine. Assuming that the name entered in the file save dialog is "FilterName", the generated assembly file is "FilterName.s".
The "Use General Subroutine" radio button specifies that the filter source routine to be
used is one of the following:
• FIR_Filter.s (Used in the case of FIR Filters)
• IIRT_Filter.s (Used in the case of Transposed IIR Filters)
• IIRC_Filter.s (used in the case of Canonic IIR Filters)
These general routines reside in the dsPIC FD setup folder depending on the filter type chosen in dsPIC FD (FIR, IIR Transpose or
IIR Canonic). The respective general subroutine along with the generated FilterName.s assembly file must be added to the
MPLAB Integrated Development Environment (IDE) project. The general subroutines will use the filter structure and filter coefficients
present in the generated FilterName.s file as inputs.
The C support files option allows creation of a C header file: FilterName.h. This file is automatically created if the C wrapper option is
selected for simulation of the filter. Coefficients can be placed in X space or program space. Coefficients cannot be placed in
Y space. The coefficient space selection is used to indicate where the coefficients need to be stored. The generated assembly code
structure for the filter has the information on whether X space or program space is used for coefficients.
• C Header File: FilterName.h
This file creates the external reference from C to the assembly language filter structure for the specified filter. It also has a sample code fragment showing how to call the generalized filter routine.
• C Wrapper: FilterName_sim.c, FilterName_sim.cmd, FilterName_make.bat
This option generates a C program that creates FilterName_imresponse.dat. It also automatically builds the FilterName.h and FilterName_sim.cmd which is the command file for the command line simulator dsPIC30.exe. Run the batch file
FilterName_make.bat to assemble, compile, link and execute the command line simulator.
• M-File: FilterName_matlab.m or FilterName_octave.m
This option generates a command file for use in either MATLAB or OCTAVE.
|
Microchip Technology Inc. |