SW500009 Microchip Technology, SW500009 Datasheet - Page 49

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
C Language Features
3.2.6.2 Flash Access Functions
The flash_read() function provides the same functionality as the FLASH_READ() macro but will
potentially cost less in code space if multiple invocations are required.
The block of data being duplicated can be sourced from either RAM or program memory. This
routine is only available for those devices which support writing to flash memory in sizes greater
than one word at a time.
cess, the flash_erase() function provides this service if required.
3.2.7 Baseline PIC special instructions
The PIC baseline (12-bit instruction word) devices have some registers which are not in the normal
SFR area and cannot be accessed using an ordinary move instruction. The HI-TECH C compiler can
be instructed to automatically use the special instructions intended for such cases when pre-defined
symbols are accessed.
the compiler that the registers are outside of the normal address space and that a different access
method is required.
3.2.7.1 The OPTION instruction
Some baseline PIC devices use an option instruction to load the OPTION register. The appropriate
header files contain a special definition for a C object called OPTION and macros for the bit sym-
bols which are stored in this register. PICC will automatically use the option instruction when an
appropriate processor is selected and the OPTION object is accessed.
timer, the following code can be used after including pic.h.
This will load the appropriate value into the W register and then call the option instruction.
3.2.7.2 The TRIS instructions
Some PIC devices use a tris instruction to load the TRIS register. The appropriate header files contain
a special definition for a C object called TRIS. PICC will automatically use the tris instruction when
an appropriate processor is selected and the TRIS object is accessed.
used after including pic.h.
The flash_copy() function allows duplication of a block of memory at a location in flash memory.
For the small subset of devices which allow independant control over a flash block erasure pro-
The definition of the special symbols make use of the control keyword. This keyword informs
For example, to set the prescaler assignment bit so that prescaler is assigned to the watch dog
For example, to make all the bits on the output port high impedance, the following code can be
OPTION = PSA;
Processor-related Features
35

Related parts for SW500009