8XC251SA, SB, SP, SQ USER’S MANUAL
14-2
In some microcontroller applications, it is desirable that user program code be secure from unau-
thorized access. The 8XC251Sx offers two types of protection for program code stored in the on-
chip array.
•
Program code in the on-chip code memory is encrypted when read out for verification if the
encryption array is programmed.
•
A three-level lock bit system restricts external access to the on-chip code memory.
14.1.1 Programming Considerations for On-chip Code Memory
It is recommended that user program code be located starting at address FF:0100H. Since the first
instruction following device reset is fetched from FF:0000H, use a jump instruction to FF:0100H
to begin execution of the user program. For information on address spaces, see Chapter 3.
The top eight bytes of the memory address space (FF:FFF8H–FF:FFFFH) are reserved for device
configuration. Do not read or write user code at these locations. For EA# = 1, the reset routine
obtains configuration information from a configuration array located these addresses. For
EA# = 0, the reset routine obtains configuration information from a configuration array in exter-
nal memory using these internal addresses. For a detailed discussion of device configuration, see
Chapter 4.
ROM/OTPROM/EPROM devices have on-chip user code memory at FF:0000–FF:1FFFH
(8 Kbytes) or FF:0000H–FF:3FFFH (16 Kbytes). Addresses outside these ranges access external
memory. With EA# = 1 and both on-chip and external code memory, you can place code at the
highest addresses of the on-chip ROM/OTPROM/EPROM. When the highest on-chip address is
exceeded during execution, code fetches automatically rollover from on-chip memory to external
memory. See the notes on pipelining in section 3.2.2, “On-chip Code Memory (83C251SA, SB,
SP, SQ/87C251SA, SB, SP, SQ).”
With EA# = 1 and only on-chip code memory, multi-byte instructions and instructions that result
in call returns or prefetches should be located a few bytes below the maximum address to avoid
inadvertently exceeding the top address. Use an EJMP instruction, five or more addresses below
the top of memory, to continue execution in other areas of memory. See the note on pipelining in
section 3.2.2, “On-chip Code Memory (83C251SA, SB, SP, SQ/87C251SA, SB, SP, SQ).”
CAUTION
Execution of user code located in the top few bytes of the on-chip user
memory may cause prefetches from the next higher addresses, i.e. external
memory. External memory fetches make use of port 0 and port 3 and may
disrupt program execution if the program uses port 0 or port 3 for a different
purpose.
Summary of Contents for 8XC251SA
Page 2: ......
Page 3: ...May 1996 8XC251SA 8XC251SB 8XC251SP 8XC251SQ Embedded Microcontroller User s Manual...
Page 18: ......
Page 19: ...1 Guide to This Manual...
Page 20: ......
Page 30: ......
Page 31: ...2 Architectural Overview...
Page 32: ......
Page 41: ...3 Address Spaces...
Page 42: ......
Page 63: ...4 Device Configuration...
Page 64: ......
Page 81: ...5 Programming...
Page 82: ......
Page 102: ......
Page 103: ...6 Interrupt System...
Page 104: ......
Page 120: ......
Page 121: ...7 Input Output Ports...
Page 122: ......
Page 132: ......
Page 133: ...8 Timer Counters and Watchdog Timer...
Page 134: ......
Page 153: ...9 Programmable Counter Array...
Page 154: ......
Page 170: ......
Page 171: ...10 Serial I O Port...
Page 172: ......
Page 187: ...11 Minimum Hardware Setup...
Page 188: ......
Page 197: ...12 Special Operating Modes...
Page 198: ......
Page 206: ......
Page 207: ...13 External Memory Interface...
Page 208: ......
Page 239: ...14 Programming and Verifying Nonvolatile Memory...
Page 240: ......
Page 250: ......
Page 251: ...A Instruction Set Reference...
Page 252: ......
Page 390: ......
Page 391: ...B Signal Descriptions...
Page 392: ......
Page 400: ......
Page 401: ...C Registers...
Page 402: ......
Page 436: ......
Page 437: ...Glossary...
Page 438: ......
Page 446: ......
Page 447: ...Index...
Page 448: ......
Page 458: ......