Vijay V

EBI with S12Xep100. how to declare a variable in the external memory

Discussion created by Vijay V on Nov 5, 2007
Latest reply on Nov 5, 2007 by Vijay V
Hi,
 
I am trying to get a Epson Display controller s1d13a05 interfaced to the s12xep100 chip (normal expanded mode operation). The 256K epson display controller's RAM is mapped to the CS0 range (starting at 0x400000)
 
I am using Codewarrior compiler and PE micro debugger
 
I am able to read and write to the display controller through a pointer (see below).
#define BASE_ADDRESS 0x400000
#define Display_Buffer (*(volatile unsigned char* far)(0x40000 + BASE_ADDRESS))
 
 
My question is how to declare a  variable in the mapped  external location. Below is the code which i am using. Please suggest me if there is any right way of doing this. Else should i change any compiler settings in the codewarrior.

#pragma DATA_SEG DISPLAY_RAM  //DISPLAY_RAM is defined in the linker .prm file for CS0 area
unsigned char far Display_Buffer[10][10];

the above code does not generate the GPAGE data properly.

Please help me.

Vijay V

 

 

 

 

Outcomes