SW500010 Microchip Technology, SW500010 Datasheet - Page 68

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
serial_number will never revert back to the original 0x1234 value, even after reset, unless explicitly
programmed to do so.
a complex expression involving an eeprom qualified object is used, the compiler will generated a
“can’t generate code” error. In this case you should try and simplify the expression, perhaps by
using a temporary variable.
3.2.5.2 The __EEPROM_DATA() macro
For those PIC devices that support external programming of their EEPROM data area, the __EEP-
ROM_DATA() macro can be used to place the initial 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.
loading EEPROM contents at program time only. Using eeprom qualified variables provides a more
flexible approach to pre-loading of EEPROM as they do not require initialization of eight bytes at a
time and they also come with built-in runtime access as discussed in section 3.2.5.1.
3.2.5.3 EEPROM Access Functions
The library functions eeprom_read() and eeprom_write(), 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 and retrieve it using these functions would be:
68
Note the compiler only support basic assignment operations on eeprom qualified objects. If
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, it is to be used for pre-
As the location of eeprom qualified variables is managed by the toolsuite, it is not nec-
essary to access EEPROM by specific address, in fact this should be avoided. For this
reason it is not recommended to combine the use of eeprom qualified variables with any
other EEPROM access method.
#include <htc.h>
__EEPROM_DATA(0, 1, 2, 3, 4, 5, 6, 7);
C Language Features

Related parts for SW500010