User`s guide
© 2006 Microchip Technology Inc. DS51519B-page 75
MPLAB
®
IDE
USER’S GUIDE
Chapter 5. External Memory Handling
5.1 INTRODUCTION
Some Microchip devices allow the extension or replacement of program memory
resources with external (off-chip) memory devices. MPLAB IDE handles this device
feature as described here.
• Configuration Bits and External Memory Setup
• External Memory Enabled in MPLAB IDE
• Program Memory Window
5.2 CONFIGURATION BITS AND EXTERNAL MEMORY SETUP
A device that supports external memory must be set up to use external memory via the
device Configuration bits.
For PIC17CXXX and PIC18F6XXX/8XXX devices, a Program Memory mode is set by
using Configuration bits. Depending on the device, the Processor Mode Select bits are
located in a configuration register which is programmed when the device is
programmed.
For PIC18C601/801 devices, External Bus Data Width is set as a Configuration bit.
To set the values of Configuration bits for your selected device, open the Configuration
Bits window by selecting Configure>Configuration Bits
. In the Category column, find
the bits you need to set and click on them to change their value. See
Section 12.21 “Configuration Bits Window” for more information on this window.
Information on device memory modes and the external bus is provided below. For more
information, consult the device data sheet.
5.2.1 PIC17CXXX Program Memory Modes
PIC17CXXX devices are capable of operating in any one of several program memory
modes, using combinations of on-chip and external program memory. Available
program memory modes are as follows:
• The Microprocessor mode permits access only to external program memory; the
contents of the on-chip program memory are ignored. The program counter
permits access to a linear program memory space and defines the amount of
accessible program memory (see Section 5.2.4 “Program Counter”).
Microprocessor mode is the default mode of an unprogrammed device.
• The Microcontroller and Protected Microcontroller modes access only on-chip
program memory. Attempts to read above the physical limit of the on-chip memory
results in unknown data. The Protected Microcontroller mode also enables the
code protection feature.
Note: Configuration bits may also be set in code using __config. Refer to the
device data sheet and header file (.inc or .h) for more information.