SW500010 Microchip Technology, SW500010 Datasheet - Page 72

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
Processor-related Features
used after including pic.h.
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 HI-TECH C PRO for the
PIC10/12/16 MCU Family 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.
to use this 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:
The location which stores the calibration constant is never code protected and will be lost if you re-
program the device. Thus, if you are using a windowed or flash device, the calibration constant must
72
For example, to make all the bits on the output port high impedance, the following code can be
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
TRIS = 0xFF;
OSCCAL = _READ_OSCCAL_DATA();
C Language Features

Related parts for SW500010