Datasheet

© 2005 Microchip Technology Inc. DS70043F-page 51
dsPIC30F
12.2 Peripheral Driver Library
Microchip offers a free peripheral driver library that
supports the setup and control of dsPIC30F hardware
peripherals, including, but not limited to:
Analog-to-Digital Converter
Motor Control PWM
Quadrature Encoder Interface
•UART
SPI
Data Converter Interface
•I
2
C
General Purpose Timers
Input Capture
Output Compare/Simple PWM
•CAN
I/O Ports and External Interrupts
Reset
In addition to the hardware peripherals, the library
supports software generated peripherals, such as
standard LCD drivers, which support a Hitachi style
controller.
The peripheral library consist of more than 270
functions as well as several macros for simple tasks
such as enabling and disabling interrupts. All peripheral
driver routines are developed and optimized using the
MPLAB C30 C Compiler. Electronic documentation
accompanies the peripheral library to help you become
familiar with and implement the library functions.
Key features of the dsPIC30F Peripheral Library
include:
A library file for each individual device from the
dsPIC30F family, including functions
corresponding to peripherals present in that
particular device.
•C include files that let you take advantage of
pre-defined constants for passing parameters to
various library functions. There is an include file
for each peripheral module.
Since the functions are in the form of precompiled
libraries, they can be called from a user
application program written in either MPLAB
C30
or dsPIC30F assembly language.
Included C source code allows you to customize
peripheral functions to suit your specific
application requirements.
Predefined constants in the C include files
eliminate the need to refer to the details and
structure of every Special Function Register while
initializing peripherals or checking Status bits.
12.3 DSP Algorithm Library
The free DSP library supports multiple filtering,
convolution, vector and matrix functions. Among the
supported functions are:
Cascaded Infinite Impulse Response (IIR) Filters
•Correlation
Convolution
Finite Impulse Response (FIR) Filters
Windowing Functions
•FFTs
LMS Filter
Vector Addition and Subtraction
Vector Dot Product
•Vector Power
Matrix Addition and Subtraction
Matrix Multiplication
Some DSP functions use double precision and floating
point arithmetic. All DSP routines are developed and
optimized in dsPIC30F assembly language and are
callable from both assembly and C language. The
Microchip MPLAB C30 and IAR C compilers are
supported.
Key features of the DSP Algorithm Library include:
49 total functions
Full compliance with the Microchip dsPIC30F C30
Compiler, Assembler and Linker
Simple user interface – just one library file and
one header file
Functions are both C and assembly callable
FIR filtering functions include support for Lattice,
Decimating, Interpolating and LMS filters
IIR filtering functions include support for Canonic,
Transposed Canonic and Lattice filters
FIR and IIR functions may be used with the filter
files generated by the dsPIC30F Filter Design
program
Transform functions include support for in-place
and out-of-place DCT, FFT and IFFT transforms
Window functions include support for Bartlett,
Blackman, Hamming, Hanning and Kaiser
windows
Support for Program Space Visibility
Complete function profile information including
register usage, cycle count and function size
information
Electronic documentation is included to help you
comprehend and use the library functions