This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Absolute Memory Macros Using FVAR in 0xC00000 address space.

C51, Version 7.01
AX51, Version 2.01
LX51, Version 3.51

ADuC832 microcontroller

The FVAR examples talk about how the R3 register 0x02 - 0x7F references external memory locations located between 0x010000 and 0x7EFFFF. I divided the external 16MB memory into 4 sections: 0x000000-0x3FFFF, 0x400000-0x7FFFFF, 0x800000-0xBFFFFF, and 0xC00000-0xFFFFFF. Can I still use the FVAR macro to define the following variables?

#include <ADUC832.H>
#include <stdio.h>
#include <absacc.h>

#define reg1 FVAR(char, 0x000000)
#define reg2 FVAR(char, 0x400000)
#define reg3 FVAR(char, 0x800000)
#define reg4 FVAR(char, 0xC00000)

void main (void)
{
  reg1 = 0x55;
  reg2 = 0xaa;
  reg3 = 0x5a;
  reg4 = 0xa5;
}