PCDIDE COMPILER Custom Computer Services Inc (CCS), PCDIDE COMPILER Datasheet - Page 153

PCD C-COMPILER PIC24, DSPIC

PCDIDE COMPILER

Manufacturer Part Number
PCDIDE COMPILER
Description
PCD C-COMPILER PIC24, DSPIC
Manufacturer
Custom Computer Services Inc (CCS)
Type
Compilerr
Datasheet

Specifications of PCDIDE COMPILER

For Use With/related Products
Microchip PIC24/dsPIC®
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
429-1008
#USE DELAY
Syntax:
Elements:
Purpose:
Examples:
#USE DELAY (options))
Options may be any of the following separated by commas:
clock=speed speed is a constant 1-100000000 (1 hz to 100 mhz).
This number can contains commas. This number also supports the following
denominations: M, MHZ, K, KHZ. This specified the clock the CPU runs at.
needed if the following type=speed is used and there is no frequency multiplication
or division.
type=speed type defines what kind of clock you are using, and the following
values are valid: oscillator, osc (same as oscillator), crystal, xtal (same as crystal),
internal, int (same as internal) or rc. The compiler will automatically set the
oscillator configuration bits based upon your defined type. If you specified internal, the
compiler will also automatically set the internal oscillator to the defined speed.
Configuration fuses are modified when this optio is used. Speed is the input frequency.
restart_wdt will restart the watchdog timer on every delay_us() and delay_ms() use.
AUX: type=speed Some chips have a second oscillator used by specific
periphrials and when this is the case this option sets up that oscillator.
Tells the compiler the speed of the processor and enables the use of the built-in
functions: delay_ms() and delay_us(). Will also set the proper configuration bits,
and if needed configure the internal oscillator. Speed is in cycles per second. An
optional restart_wdt may be used to cause the compiler to restart the WDT while
delaying. When linking multiple compilation units, this directive must appear in any
unit that needs timing configured (delay_ms(), delay_us(), UART, SPI).
In multiple clock speed applications, this directive may be used more than once.
Any timing routines (delay_ms(), delay_us(), UART, SPI) that need timing
information will use the last defined #USE DELAY (For initialization purposes, the
compiler will initialize the configuration bits and internal oscillator based upon the first
#USE DELAY.
// set timing config to 32KHz, User sets the fuses
// elsewhere,
// on delay_us() and delay_ms()
#use delay (clock=32000, RESTART_WDT)
//the following 4 examples all configure the timing library
//to use a 20Mhz clock, where the source is a crystal.
#use delay (crystal=20000000)
#use delay (xtal=20,000,000)
#use delay(crystal=20Mhz)
#use delay(clock=20M, crystal)
Depending on the PIC this is 2 or 4 times the instruction rate. This directive is not
restart watchdog timer
139

Related parts for PCDIDE COMPILER