SW500007 Microchip Technology, SW500007 Datasheet - Page 45

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
C Language Features
3.2.3 ID Locations
Some PIC18 devices have location outside the addressable memory area that can be used for storing
program information, such as an ID number. The __IDLOC macro may be used to place data into
these locations. The macro is used in a manner similar to:
where x is a list of nibbles which are to be positioned into the ID locations. Only the lower four bits
of each ID location is programmed, so the following:
will attempt to fill ID locations which the values: F1H, F5H, FFH, F0H, F1H. The base address of
the ID locations is specified by the idloc psect which will be automatically assigned as appropriate
address based on the type of processor selected.
3.2.4 EEPROM and Flash Runtime Access
The compiler offers several methods of accessing EEPROM and Flash memory. These are described
in the following sections.
3.2.4.1 EEPROM Access
For those PIC devices that support external programming of their EEPROM data area, the __EEP-
ROM_DATA() macro can be used to place the inital EEPROM data values into the HEX file ready
for programming. The macro is used as follows.
The macro accepts eight parameters, being eight data values. Each value should be a byte in size.
Unused values should be specified as a parameter of zero. The macro may be called multiple times
to define the required amount of EEPROM data. It is recommended that the macro be placed outside
any function definitions.
tioned by a linker option in the usual way.
ROM_READ() and EEPROM_WRITE(), and the function versions of these macros, can be called to
read from, and write to, the EEPROM during program execution. For example, to write a byte-size
value to an address in EEPROM memory using the macro version of EEPROM write:
The macro defines, and places the data within, a psect called eeprom_data. This psect is posi-
This macro is not used to write to EEPROM locations during run-time. The macros EEP-
#include <htc.h>
__IDLOC(x);
__IDLOC(15F01);
#include <htc.h>
__EEPROM_DATA(0, 1, 2, 3, 4, 5, 6, 7);
Processor-related Features
31

Related parts for SW500007