SW500009 Microchip Technology, SW500009 Datasheet - Page 50

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
Processor-related Features
This will load the appropriate value into the W register and then call the tris instruction.
TRISA, TRISB and TRISC, depending on the exact number of ports available. This objects are
used in the same manner as described above.
3.2.7.3 Calibration Space
The Microchip-modified IEEE754 32-bit floating point format parameters in the calibration space
in the PIC14000 processor may be accessed using the get_cal_data() function. The byte parameters
may be accessed directly using the identifiers defined in the header file.
3.2.7.4 Oscillator calibration constants
Some PIC devices come with an oscillator calibration constant which is pre-programmed into the
devices program memory. This constant can be read and written to the OSCCAL register to calibrate
the internal RC oscillator. On some baseline PIC devices the calibration constant is stored as a movlw
instruction at the top of program memory, e.g. the 12C50X and 16C505 parts. On reset the program
counter is made to point to this instruction and it is executed first before the program counter wraps
around to 0x0000 which is the effective reset vector for the device. The PICC compiler default
startup routine will automatically include code to load the OSCCAL register with the value contained
in the W register after reset on such devices. No other code is required by the programmer.
memory, but as a retlw instruction. The compiler’s startup code will automatically generate code to
retrieve this value and do the configuration. This feature can be turned off via the –RUNTIME
option.
macro, make sure that <htc.h> is included into the relevant modules of your program. This macro
returns the calibration constant which can then be stored into the OSCCAL register, as follows:
reprogram the device. Thus, if you are using a windowed or flash device, the calibration constant
must be saved from the last ROM location before it is erased. The constant must then be repro-
grammed at the same location along with the new program and data.
struction may not be programmed and would be executed as some other instruction. Calling the
_READ_OSCCAL_DATA() macro will not work and will almost certainly not return correctly. If you
wish to test code that includes this macro on an ICE, you will have to program a retlw instruction at
36
Those PIC devices which have more than one output port may have definitions for objects:
For other chips, such as 12C67X chips, the oscillator constant is also stored at the top of program
At runtime this value may be read using the macro _READ_OSCCAL_DATA(). To be able to use this
OSCCAL = _READ_OSCCAL_DATA();
The location which stores the calibration constant is never code protected and will be lost if you
If you are using an in-circuit emulator (ICE), the location used by the calibration retlw in-
TRIS = 0xFF;
C Language Features

Related parts for SW500009