Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual

Product codes
SW006021-1
Page of 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 316
 2012 Microchip Technology Inc.
See also
__IDLOC7()
, __CONFIG()
__IDLOC7 
Synopsis
#include <xc.h>
 
__IDLOC7(a,b,c,d)
Description
This macro is provided for legacy support only. Use the #pragma config for new proj-
ects.
This macro places data into the device’s special locations outside of addressable 
memory reserved for ID. This would be useful for storage of serial numbers etc.
The macro will attempt to write 7 bits of data to each of the 4 locations reserved for ID 
purposes.
Example
#include <xc.h>
/* will store 7Fh, 70, 1 and 5Ah in the ID registers */
__IDLOC(0x7F,70,1,0x5A);
void 
main (void)
{
}
Note
Not all devices permit 7 bit programming of the ID locations. Refer to the device data 
sheet to see whether this macro can be used on your particular device.
See also
__IDLOC()
, __CONFIG()
_DELAY() 
Synopsis
#include <xc.h>
 
void _delay(unsigned long cycles);
Description
This is an inline function that is expanded by the code generator. When called, this rou-
tine expands to an inline assembly delay sequence. The sequence will consist of code 
that delays for the number of instruction cycles that is specified as the argument. The 
argument must be a literal constant.
An error will result if the delay period requested is too large (approximately 50,659,000 
instructions). For very large delays, call this function multiple times.