C251: SETTING THE DEVICE CONFIGURATION BYTES
Information in this article applies to:
I have 251 hardware with 128K RAM and 128K FLASH ROM. I'm using an 18-bit address bus in PAGED mode. I need to set the CONFIG (UCONFIG0 and UCONFIG1) bytes at location 0xFFFFF8 and 0xFFFFF9. And, I need to set the correct memory areas in the µVision IDE. What is the correct procedure for this?
The config bytes may be set directly in the startup file provided with the C251 compiler. This file has the name START251.A51 and should be copied to your project folder. Then you should add this source file to your project and configure the options in the header of this file.
For your hardware you must make the following configuration changes in START251.A51:
CONFIGB = 1 // initializes the config bytes UCONFIG0 and UCONFIG1. RDRG EQU 0 // configures the device for 256K External Address space. PAGM EQU 0 // configures Page Mode (A15:8/D7:0 on P2, A7:0 on P0)
You should check to be sure that the waitstates setting matches your hardware requirements.
The memory layout of your target system may be configured directly in the µVision IDE in the dialog Project - Options for Target - Target. Under External Memory enter the following:
RAM Start: 0 SIZE: 0x20000 ROM Start: 0xFE0000 SIZE: 0x20000
Last Reviewed: Wednesday, August 3, 2005
of your data.