3-9
ADDRESS SPACES
NOTE
If your program executes exclusively from on-chip ROM/OTPROM/EPROM
(not from external memory), beware of executing code from the upper eight
bytes of the on-chip ROM/OTPROM/EPROM (FF:1FF8H–FF:1FFFH for 8
Kbytes, FF:3FF8H–FF:3FFFH for 16 Kbytes). Because of its pipeline
capability, the 8XC251Sx may attempt to prefetch code from external memory
(at an address above FF:1FFFH/FF:3FFFH) and thereby disrupt I/O ports 0
and 2. Fetching code constants from these eight bytes does not affect ports 0
and 2.
If your program executes from both on-chip ROM/OTPROM/EPROM and
external memory, your code can be placed in the upper eight bytes of the on-
chip ROM/OTPROM/EPROM. As the 8XC251Sx fetches bytes above the top
address in the on-chip ROM/OTPROM/EPROM, the code fetches automati-
cally become external bus cycles. In other words, the rollover from on-chip
ROM/OTPROM/EPROM to external code memory is transparent to the user.
3.2.2.1 Accessing On-chip Code Memory in Region 00:
The 87C251SB, SQ and the 83C251SB, SQ can be configured so that the upper half of the 16-
Kbyte on-chip code memory can also be read as data at locations in the top of region 00: (see
“Configuration Bytes” on page 14-7). That is, locations FF:2000H–FF:3FFFH can also be access-
ed at locations 00:E000H–00:FFFFH. This is useful for accessing code constants stored in
ROM/OTPROM/EPROM. Note, however, that all of the following three conditions must hold for
this mapping to be effective:
• The device is configured with EMAP# = 0 in the UCONFIG1 register (See Chapter 4).
• EA# = 1.
• The access to this area of region 00: is a data read, not a code fetch.
If one or more of these conditions do not hold, accesses to the locations in region 00: are referred
to external memory.
NOTE
Remapping does not apply to the 87C251SA, SP and the 83C251SA, SP.
Table 3-2. Minimum Times to Fetch Two Bytes of Code
Type of Code Memory State Times
On-chip Code Memory 1
External Memory (page mode) 2
External Memory (nonpage mode) 4