Beruflich Dokumente
Kultur Dokumente
CE005 - Using FIR Filters from dsPIC Filter Design and DSP library
-------------------------------------------------------------------
In this code example, we demonstrate how these tools can be used to generate
signals, design filters and implement these in firmware.
This example demonstrates how one can filter a square wave to produce
a sine wave signal. For the example, we have used an input square
wave of 1 KHz frequency sampled at 20 KHz. This signal was generated
by dsPICworks Data Analysis and Design Software.
2. Folder Contents:
-------------------
This folder contains the following sub-folders:
a. gld
This folder contains a linker script file for the example project.
This file is used for building the project for a 30F6014A device.
This file simply includes the relevant device linker script,
"p30F6014A.gld" and the relevant MPLAB� C30 library files,
"libdsp-coff.a", "libc-coff.a", and "libm-coff.a" or
"libdsp-elf.a", "libc-elf.a", and "libm-elf.a" from their installed
location.
b. h
This folder contains C header files useful in building this
project. Device register and bit definitions are provided in
the "p30F6014A.h" file, which may be found in the installation folder
of the MPLAB� C30 toolsuite.
c. hex
This folder contains three file types - coff, hex and map.
These are files generated by the MPLAB� C30 toolsuite on build
operation performed within MPLAB� IDE. The *.map file contains
details on memory allocation for various variables, constants
and dsPIC30F instructions specified in the source and library
code. The *.hex file contains a binary file that may be
programmed into the dsPIC30F device. The *.coff file contains
a binary file that is used by MPLAB� IDE for simulation.
d. src
This folder contains all the C and Assembler source files (*.c,
*.s) used in demonstrating the described example. This folder
also contains a sub-folder named "obj" that stores compiled
object files generated when the project is built.
e. design
This folder contains files created by dsPIC Filter Design and
dsPICworks Data Analysis and Design Software. Input signal files,
output signal files and filter specifications have been provided
here.
b. Provide the correct device linker script and header file for your
device. Device linker scripts and header files are available in your
MPLAB� C30 installation folder under:
Device Linker Script-
YourDrive:>Program Files\Microchip\MPLAB C30\support\gld
Device C Header file-
YourDrive:>Program Files\Microchip\MPLAB C30\support\h
Device ASM Include file-
YourDrive:>Program Files\Microchip\MPLAB C30\support\inc
c. Provide the appropriate path to your MPLAB C30 support file locations
using the menu option:
MPLAB IDE>>Project>>Build Options>>Project
5. Revision History :
---------------------
09/30/2005 - Initial Release of the Code Example