SW500007 Microchip Technology, SW500007 Datasheet - Page 66

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
Supported Data Types and Variables
3.4.12.1 RAM Pointers
All RAM pointer objects on these PIC18 devices are 16 bits wide, with the exception of pointers to
objects qualified as near which are 8 bits wide.
is 16 bits wide and can access all of the RAM available on the PIC18 devices.
bank. In other words they can be used to dereference any variable qualified as near. The amount of
general purpose RAM in the access bank varies from device to device. Being smaller in size, using
pointers to near result in smaller code sizes. If a pointer only ever accesses near-qualified objects,
then that pointer should be qualified as a pointer to near.
affected by the choice of memory model.
3.4.12.2 Const and Far Pointers
Const and far pointers can either be 16 or 24 bits wide. Their size can be toggled with the --CP=24
or --CP=16 command line option. The code used to dereference them also changes with their size.
The same pointer size must be used for all modules in a project.
write to the address they hold. A pointer to const objects cannot be used to write as the const
qualifier imposes that the object is read-only.
space. At runtime when dereferenced, the contents of the pointer are examined. For addresses above
the upper limit of RAM the program space is accessed using table read or table write instructions.
Addresses below the upper limit of RAM access the data space. Even if the address held by a pointer
to const is in RAM, the RAM location may not be changed.
space so that the correct memory space is accessed when dereferencing with pointers.
lower 64k bytes may be accessed with 16-bit wide pointers. Provided that all program space objects
that need to be dereferenced are in the lower 64k bytes, 16-bit pointers to const and far objects
may still be used. The smaller pointer size results in less RAM required and less code produced and
so should be used whenever possible.
space. At runtime when dereferenced, the contents of the pointer are examined. If bit number 21
in the address is set, the address is assumed to be a RAM address. Bit number 21 of the address is
52
A pointer to RAM, for example:
A pointer to near is only 8 bits wide and can access the general-purpose RAM area of the access
The operation of RAM pointers is unaffected by the --CP=24/--CP=16 switch, nor are they
A pointer to far is identical to a pointer to const, except that pointers to far may be used to
Const and far pointers which are 16 bits wide can access all RAM areas and most of the program
The default linker options always place const data at addresses above the upper limit of the data
If the target device selected has more than 64k bytes of program space memory, then only the
Const and far pointers which are 24 bits wide can access all RAM areas and all of the program
char * cp;
C Language Features

Related parts for SW500007