Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to access the external memory ?

Status
Not open for further replies.

sacrpio

Member level 3
Member level 3
Joined
May 24, 2004
Messages
56
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
500
External Memory Access..

We acces external memory using XDATA in Keil C. Is there any other method to acess the external memory.

thanks
 

Re: External Memory Access..

u can use inline assembly put address in DPTR and access the byte or

use xbyte[address] = value

value = xbyte[address]

learn more the final word on 8051 microcontroller
 

Re: External Memory Access..

sacrpio said:
We acces external memory using XDATA in ke*il C. Is there any other method to acess the external memory.

thanks

for example define memory at xram as:
var_int as integer
var_char as char
var_long as long

address begin 8000H:
8255_PortA as char
8255_PortB as char
8255_PortC as char
8255_PortCR as char


you must declare as:

int xdata var_int;
char xdata var_char;
long xdata var_long;

char xdata 8255_PortA _at_ 0x8000;
char xdata 8255_PortB _at_ 0x8001;
char xdata 8255_PortC _at_ 0x8002;
char xdata 8255_PortCR _at_ 0x8003;

To assign and read data to/from variable like you write in C programming.

Added after 30 minutes:

Read this link:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top