SW006010 Microchip Technology, SW006010 Datasheet - Page 67

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
7.1
7.2
7.3
 2002 Microchip Technology Inc.
INTRODUCTION
HIGHLIGHTS
PROCESSOR HEADER FILE
This section discusses device support files used in support of MPLAB C17
compilation.
Items discussed in this chapter are:
• Processor Header File
• Register Definitions File
• Using SFRs
The processor header file is a C file that contains external declarations for the special
function registers. Register definitions are found in the Register Definitions File
(7.4 “Register Definitions File”).
In addition to register declarations, the header file defines in-line assembly macros
(Table 7-1) and interrupt install macros.
There are certain instructions on PICmicro MCUs that may need to execute from the
C code. They can be included as in-line assembler instructions but for convenience
they are also available as macros in C. They are listed in the following table:
TABLE 7-1:
Nop()
ClrWdt()
Sleep()
Reset()
Rlcf(var,dest,access)
Rlncf(var,dest,access)
Rrcf(var,dest,access)
Rlncf(var,dest,access)
Swapf(var,dest,access)
Note: ‘var’ must be an 8-bit quantity (e.g., char) and not located on the stack.
Chapter 7. Device Support Files
Instruction Macro
INSTRUCTION MACRO ACTIONS
MPLAB
Executes a no operation (NOP).
Clears the watchdog timer (CLRWDT).
Executes a SLEEP instruction.
Executes a device reset (RESET).
Rotates ‘var’ to the left through the carry bit.
Rotates ‘var’ to the left without going through the
carry bit.
Rotates ‘var’ to the right through the carry bit.
Rotates ‘var’ to the right without going through the
carry bit.
Swaps the upper and lower nibble of ‘var’.
®
C17 C COMPILER
USER’S GUIDE
Action
apRNOVM^-page 61
Part
Part
Part
Part
1
2
3
4

Related parts for SW006010