Keil™, An ARM® Company

Technical Support

C51: ASSIGNING AN I/O ADDRESS TO A VARIABLE

QUESTION

How do I assign a variable to a specific memory location, an I/O address, using µVision?

ANSWER

You may use one of the following methods to assign a specific address to a variable.

  1. Use the _at_ keyword when you declare the variable.
  2. Use the Absolute Access Macros defined in ABSACC.H in \C51\INC.
  3. Use the CODE, XDATA, BIT, and other directives in the BL51 linker to locate a SEGMENT at a particular address.

All three of these methods are discussed in detail in the C51 Compiler User's Guide.

MORE INFORMATION

Last Reviewed: Friday, September 16, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure