How do I access variables in external program space on PICC18 ?
Q. How do I access variables in external program space on PICC18 ? A. The far type qualifier is used to place variables of permanent duration into external program space of the PIC18 for those devices which can support additional memory. Variables of permanent duration are defined as global or static variables. Accesses to far variables are less efficient than accesses to internal variables and extensive accesses to these variables will result in larger code sizes. Here is an example of an unsigned int object placed into the device???s external code space: far unsigned int farvar; Note that a –RAM option is mandatory to specify the external address range where far variables will reside. Also consider that if the external memory area uses addresses greater than FFFFh (as in most cases) the –CP=24 command line option will also be required (STD compiler only) in order to access these variables correctly. The –RAM option is used to specify to the linker that additional data memory is av