English
Language : 

PIC18F6585 Datasheet, PDF (95/496 Pages) Microchip Technology – 64/68/80-Pin High-Performance, 64-Kbyte Enhanced Flash Microcontrollers with ECAN Module
PIC18F6585/8585/6680/8680
6.0 EXTERNAL MEMORY
INTERFACE
Note:
The external memory interface is not
implemented on PIC18F6X8X (64/68-pin)
devices.
The external memory interface is a feature of the
PIC18F8X8X devices that allows the controller to
access external memory devices (such as Flash,
EPROM, SRAM, etc.) as program memory.
The physical implementation of the interface uses
27 pins. These pins are reserved for external address/
data bus functions; they are multiplexed with I/O port
pins on four ports. Three I/O ports are multiplexed with
the address/data bus, while the fourth port is multi-
plexed with the bus control signals. The I/O port func-
tions are enabled when the EBDIS bit in the MEMCON
register is set (see Register 6-1). A list of the
multiplexed pins and their functions is provided in
Table 6-1.
As implemented in the PIC18F8X8X devices, the
interface operates in a similar manner to the external
memory interface introduced on PIC18C601/801
microcontrollers. The most notable difference is that
the interface on PIC18F8X8X devices only operates in
16-bit modes. The 8-bit mode is not supported.
For a more complete discussion of the operating modes
that use the external memory interface, refer to
Section 4.1.1 “PIC18F8X8X Program Memory
Modes”.
6.1 Program Memory Modes and the
External Memory Interface
As previously noted, PIC18F8X8X controllers are
capable of operating in any one of four program mem-
ory modes using combinations of on-chip and external
program memory. The functions of the multiplexed port
pins depend on the program memory mode selected as
well as the setting of the EBDIS bit.
In Microprocessor Mode, the external bus is always
active and the port pins have only the external bus
function.
In Microcontroller Mode, the bus is not active and the
pins have their port functions only. Writes to the
MEMCOM register are not permitted.
In Microprocessor with Boot Block or Extended
Microcontroller Mode, the external program memory
bus shares I/O port functions on the pins. When the
device is fetching or doing table read/table write
operations on the external program memory space, the
pins will have the external bus function. If the device is
fetching and accessing internal program memory
locations only, the EBDIS control bit will change the
pins from external memory to I/O port functions. When
EBDIS = 0, the pins function as the external bus. When
EBDIS = 1, the pins function as I/O ports.
 2004 Microchip Technology Inc.
DS30491C-page 93