SW006012 Microchip Technology, SW006012 Datasheet - Page 89

C COMPILER FOR DSPIC30F FAMILY

SW006012

Manufacturer Part Number
SW006012
Description
C COMPILER FOR DSPIC30F FAMILY
Manufacturer
Microchip Technology
Type
MPLAB® C30 Compilerr
Series
PIC24 & DsPICr
Datasheets

Specifications of SW006012

Supported Families
PIC24, DsPIC30F And DsPIC33F
Core Architecture
PIC, DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Tool Type
Compiler
Processor Series
PIC24, dsPIC
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
dsPIC30F
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
6.1
6.2
6.3
© 2007 Microchip Technology Inc.
INTRODUCTION
HIGHLIGHTS
PROCESSOR HEADER FILES
This section discusses device support files used in support of MPLAB C30 compilation.
Items discussed in this chapter are:
• Processor Header Files
• Register Definition Files
• Using SFRs
• Using Macros
• Accessing EEDATA from C Code - dsPIC30F dSCs only
The processor header files are distributed with the language tools. These header files
define the available Special Function Registers (SFR’s) for each dsPIC DSC device.
To use a header file in C, use;
#include <p30fxxxx.h>
where xxxx corresponds to the device part number. The C header files are distributed
in the support\h directory.
Inclusion of the header file is necessary in order to use SFR names
(e.g., CORCONbits).
For example, the following module, compiled for the dsPIC30F2010 part, includes two
functions: one for enabling the PSV window, and another for disabling the PSV window.
#include <p30f2010.h>
void
EnablePSV(void)
{
}
void
DisablePSV(void)
{
}
Chapter 6. Device Support Files
CORCONbits.PSV = 1;
CORCONbits.PSV = 0;
USER’S GUIDE
MPLAB
DS51284F-page 83
®
C30

Related parts for SW006012