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 can I access the last 128 bytes of memory in 8052?

Status
Not open for further replies.

ayan_m

Newbie level 6
Newbie level 6
Joined
Jan 17, 2005
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
118
8052 128 bytes ram assembler

HI,
8052 has 256 bytes of RAM . I am having trouble accessing the last 128 bytes directly. I have read help but nowhere is it that the last 128 bytes cannot be accessed directly. How can I access the last 128 bytes directly?
ayan
 

Re: Memory access in 8052

What development evironment are you using?
Are you writing code in assembler or any high-level language?
 

Re: Memory access in 8052

The upper half of the memory is indirect addressable only
in assembly you can write to this location with:
Code:
mov r0, #80h
mov @r0, value
 

Re: Memory access in 8052

To address (indirect) the upper half you can use both R0 and R1 registers and the address range is 80h to FFh:
MOV R0(1), address
and then
MOV A, @R0 (1)
MOV @R0(1), A
MOV direct, @R0 (1)
MOV @R0(1), direct
MOV @R0(1), #DATA

Good idea is to locate SP in the upper half
MOV SP, #90h (or other)
 

Re: Memory access in 8052

ayan_m said:
HI,
last 128 bytes cannot be accessed directly
ayan
Never accessibility!
Because last 128bytes in directly mode is located all of register area.
And so on, you only access last 128bytes general purpose RAM with indirectly mode (the same as pointer).
 

Re: Memory access in 8052

ayan_m,

Why don't you people read the documentation first and then, when you have no other alternative turn here for help.

Even if someone get you enlighten instantly, you'll have to(in my opinion) check for yourself to see if it is true in the documentation.

So, in the end you'll heve to read it!!! Do it first!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top