Datasheet
PIC18F87J50 FAMILY
DS39775C-page 72 © 2009 Microchip Technology Inc.
5.1.4 EXTENDED MICROCONTROLLER
MODE AND ADDRESS SHIFTING
By default, devices in Extended Microcontroller mode
directly present the program counter value on the
external address bus for those addresses in the range
of the external memory space. In practical terms, this
means addresses in the external memory device below
the top of on-chip memory are unavailable.
To avoid this, the Extended Microcontroller mode
implements an address shifting option to enable auto-
matic address translation. In this mode, addresses
presented on the external bus are shifted down by the
size of the on-chip program memory and are remapped
to start at 0000h. This allows the complete use of the
external memory device’s memory space.
FIGURE 5-3: MEMORY MAPS FOR PIC18F87J50 FAMILY PROGRAM MEMORY MODES
TABLE 5-2: MEMORY ACCESS FOR PIC18F8XJ5X PROGRAM MEMORY MODES
External
Memory
On-Chip
Program
Memory
Microcontroller Mode
(1)
000000h
On-Chip
Program
Memory
1FFFFFh
Reads
‘0’s
External
On-Chip
Memory
Memory
(Top of Memory)
(Top of Memory) + 1
Legend: (Top of Memory) represents upper boundary of on-chip program memory space (see Figure 5-1 for device-specific
values). Shaded areas represent unimplemented, or inaccessible areas, depending on the mode.
Note 1: This mode is the only available mode on 64-pin devices and the default on 80-pin devices.
2: These modes are only available on 80-pin devices.
3: Addresses starting at the top of the program memory are translated to start at 0000h of the external device
whenever the EASHFT Configuration bit is set.
Extended Microcontroller Mode
(2)
000000h
1FFFFFh
(Top of Memory)
(Top of Memory) + 1
External
Memory
On-Chip
Program
Memory
000000h
1FFFFFh
(Top of Memory)
(Top of Memory) + 1
(3)
No
Access
Space
On-Chip
Memory
Space
External
On-Chip
Memory
Memory
Space
Mapped
to
External
Memory
Space
Space
Space
Mapped
to
External
Memory
Space
(Top of Memory)
Extended Microcontroller Mode
with Address Shifting
(2)
1FFFFFh –
Operating Mode
Internal Program Memory External Program Memory
Execution
From
Table Read
From
Table Write
To
Execution
From
Table Read
From
Table Write
To
Microcontroller Yes Yes Yes No Access No Access No Access
Extended Microcontroller Yes Yes Yes Yes Yes Yes