SW006010 Microchip Technology, SW006010 Datasheet - Page 68

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
MPLAB
7.4
apRNOVM^-page 62
REGISTER DEFINITIONS FILE
C17 C Compiler User’s Guide
Header files are device (processor) specific, (i.e., choose the header file
when coding for the PIC17C756). These files are contained in the
where
Processor header files for PIC17 devices contain external declarations for the special
function registers, in-line assembly macros and interrupt install macros.
PIC17 header files have four macros for installing interrupt service routines to the four
interrupt vectors available. Call these macros as part of setting up the interrupt
handler functions. Specify which C function should act as the interrupt handling
function for a particular interrupt vector. For more information on how interrupts are
handled by MPLAB C17, please refer to Chapter 9. Interrupt support macros are listed
in the following table:
TABLE 7-2:
The register definitions file is an assembly file that contains declarations for all the
special function registers on the device. Every register definitions file is associated
with a C header file (7.3 “Processor Header File”) that contains, among other things,
external declarations for the special function registers.
The register definitions file, when compiled, will become an object file that will need to
be linked to the source file. As an example,
added to the tutorial project in Chapter 5. These files are device (processor) specific.
Register definitions file source code is found in the
compiled object code is found in the
compiler install directory.
An example of a use for a register definitions file in MPLAB C17 is as follows.
EXAMPLE 7-1:
Here Port A is defined in the register definitions file
BANK0_SFR_SEC
PORTAbits
PORTA
TRISB
.
.
and so on.
Install_INT(func)
Install_TMR0(func)
Install_T0CKI(func)
Install_PIV(func)
c:\mcc
RES
RES
Macro
is the compiler install directory.
MACRO ACTIONS
1
1
DATA
PIC17C44 PORT A DEFINITION
; 010h
; 011h
H'010'
Sets ‘func' as the handler for the INT interrupt.
Sets ‘func' as the handler for the TMR0 interrupt.
Sets ‘func' as the handler for the T0CKI interrupt.
Sets ‘func' as the handler for the PIV interrupt.
c:\mcc\lib
p17c756.asm
directory, where
c:\mcc\src\proc
p17c44.asm
Action
compiles to
 2002 Microchip Technology Inc.
as:
c:\mcc\h
c:\mcc
p17c756.o
directory and
p17c756.h
is the
directory,
,

Related parts for SW006010