C251 User's Guide

Program Memory

Program (CODE) memory is read only; it cannot be written to. Program memory may reside within the MCS® 251 MCU, it may be external, or it may be both, depending upon the 251 derivative and the hardware design.

  • The 251 architecture supports up to 64K Bytes of program memory. However, program space can be expanded using code banking.
  • Some devices offer a larger code space.
  • Program code, including all functions and library routines, is stored in program memory.
  • Constant variables may also be stored in program memory.
  • The 251 executes programs stored in program memory only.
  • Program memory may be accessed from your C programs using the code memory type specifier.

Note

  • The code memory type is implemented for compatibility to the C51 compiler. Instead of code, you should use const near or const far. This generates typically better code and should be used in new 251 applications instead of the memory type code.