8051/2 data and iram memory question
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
8051/2 data and iram memory question
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
PagCal
Guest





Posted: Wed Dec 14, 2005 4:27 pm    Post subject: 8051/2 data and iram memory question Reply with quote

Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?
Back to top
Meindert Sprang
Guest





Posted: Wed Dec 14, 2005 4:48 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...
Quote:
Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?

What is it with you guys? Don't you read datasheets anymore?

Meindert
Back to top
Neil Kurzman
Guest





Posted: Thu Dec 15, 2005 9:15 am    Post subject: Re: 8051/2 data and iram memory question Reply with quote

PagCal wrote:

Quote:
Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?

Yes
Back to top
Jack Klein
Guest





Posted: Thu Dec 15, 2005 9:15 am    Post subject: Re: 8051/2 data and iram memory question Reply with quote

On Wed, 14 Dec 2005 05:27:47 -0500, PagCal <pagcal@runbox.com> wrote
in comp.arch.embedded:

Quote:
Does iram overlap the 128 bytes of the data space or is it seperate?

Overlapped.


Quote:
In other words, does an indirect reference to 0, reference data at 0?

Direct and indirect references in the range of 0 to 7F (hex) both
reference the internal RAM.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
Back to top
PagCal
Guest





Posted: Thu Dec 15, 2005 3:44 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

I'm new to these micros. This information is documented in a 'data
sheet?' I'll go look.

Thanks for the tip.

Meindert Sprang wrote:
Quote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...

Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?


What is it with you guys? Don't you read datasheets anymore?

Meindert

Back to top
Meindert Sprang
Guest





Posted: Thu Dec 15, 2005 4:58 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

"PagCal" <pagcal@runbox.com> wrote in message
news:SVaof.6128$Xx3.459@fe03.lga...
Quote:
I'm new to these micros. This information is documented in a 'data
sheet?' I'll go look.

Yes it is. Sometimes you'll only find hardware specs in the datasheet and
you need something that is called an "achitecture manual" or similar to
learn the architecture of the processor. www.intel.com is a good place to
look for such a manual about the 8051 series. I could mail you one, but it's
14Mbyte....

I might have sounded a bit blunt in my reaction, sorry for that. It's just
that I find it plain weird that people start working with a micro without
studying the thing inside-out by reading the datasheet. But I guess these
evaluation kits with pre-baked compiler environments are to blame for that
:-)

Well, have fun with it and good luck :-)

Meindert
Back to top
Neil Kurzman
Guest





Posted: Fri Dec 16, 2005 9:15 am    Post subject: Re: 8051/2 data and iram memory question Reply with quote

PagCal wrote:

Quote:
I'm new to these micros. This information is documented in a 'data
sheet?' I'll go look.

Thanks for the tip.

Meindert Sprang wrote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...

Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?


What is it with you guys? Don't you read datasheets anymore?

Meindert



Some of the 8051 clones only list the differences from the standard.
An8051 data sheet may be need to get the whole story.
Back to top
Bob
Guest





Posted: Fri Dec 16, 2005 5:15 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

Meindert Sprang wrote:
Quote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...
Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?

What is it with you guys? Don't you read datasheets anymore?

What datasheet? The datasheet for the 8051 compatible device I am
using (CY68013) does not make it clear if instruction RAM and data
RAM are separate or overlap in the first 128 bytes. At least not
that I can see.

The original 8051 datasheet won't help either, since the original 8051
didn't have iRAM. It had ROM.
Back to top
Meindert Sprang
Guest





Posted: Fri Dec 16, 2005 5:15 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

"Bob" <bob3635x@yahoo.com> wrote in message
news:1134734563.317127.107870@o13g2000cwo.googlegroups.com...
Quote:
Meindert Sprang wrote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...
Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?

What is it with you guys? Don't you read datasheets anymore?

What datasheet? The datasheet for the 8051 compatible device I am
using (CY68013) does not make it clear if instruction RAM and data
RAM are separate or overlap in the first 128 bytes. At least not
that I can see.

The original 8051 datasheet won't help either, since the original 8051
didn't have iRAM. It had ROM.

The MCS51 family manual tells you all this stuff. It describes the '51
family architecture and together with the device specific datasheets you can
find anything you want to know about the '51 and it's derivatives. That
manual can be found at (where else?) Intel's website:
http://www.intel.com/design/mcs51/manuals/272383.htm

Meindert
Back to top
Bob
Guest





Posted: Fri Dec 16, 2005 5:15 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

Meindert Sprang wrote:
Quote:
"Bob" <bob3635x@yahoo.com> wrote in message
news:1134734563.317127.107870@o13g2000cwo.googlegroups.com...
Meindert Sprang wrote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...
Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?

What is it with you guys? Don't you read datasheets anymore?

What datasheet? The datasheet for the 8051 compatible device I am
using (CY68013) does not make it clear if instruction RAM and data
RAM are separate or overlap in the first 128 bytes. At least not
that I can see.

The original 8051 datasheet won't help either, since the original 8051
didn't have iRAM. It had ROM.

The MCS51 family manual tells you all this stuff.

I don't think so. The original 8051 didn't even have internal iRAM.

Quote:
It describes the '51
family architecture and together with the device specific datasheets you can
find anything you want to know about the '51 and it's derivatives.

There are a lot of 8051 derivatives out there. My experience is that
the datasheets leave some gaps.
Back to top
Meindert Sprang
Guest





Posted: Fri Dec 16, 2005 5:15 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

"Bob" <bob3635x@yahoo.com> wrote in message

Quote:
I don't think so. The original 8051 didn't even have internal iRAM.

Well, maybe you mean something different with IRAM, but there is the
internal data ram on the '51, which is 128 bytes in the 8031/51.
And my compiler calls that idata, as opposed to xdata for the external data
ram.

Meindert
Back to top
Nappy
Guest





Posted: Fri Dec 16, 2005 5:15 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

a simple 1 minute google will turn up all the information you will ever need
to work with any 8051 on the planet.


"Bob" <bob3635x@yahoo.com> wrote in message
news:1134742395.536214.129720@z14g2000cwz.googlegroups.com...
Quote:
Meindert Sprang wrote:
"Bob" <bob3635x@yahoo.com> wrote in message
news:1134734563.317127.107870@o13g2000cwo.googlegroups.com...
Meindert Sprang wrote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...
Does iram overlap the 128 bytes of the data space or is it
seperate?

In other words, does an indirect reference to 0, reference data at
0?

What is it with you guys? Don't you read datasheets anymore?

What datasheet? The datasheet for the 8051 compatible device I am
using (CY68013) does not make it clear if instruction RAM and data
RAM are separate or overlap in the first 128 bytes. At least not
that I can see.

The original 8051 datasheet won't help either, since the original 8051
didn't have iRAM. It had ROM.

The MCS51 family manual tells you all this stuff.

I don't think so. The original 8051 didn't even have internal iRAM.

It describes the '51
family architecture and together with the device specific datasheets you
can
find anything you want to know about the '51 and it's derivatives.

There are a lot of 8051 derivatives out there. My experience is that
the datasheets leave some gaps.
Back to top
Stef
Guest





Posted: Fri Dec 16, 2005 5:15 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

In comp.arch.embedded,
Bob <bob3635x@yahoo.com> wrote:
Quote:
Meindert Sprang wrote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...
Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?

What is it with you guys? Don't you read datasheets anymore?

What datasheet? The datasheet for the 8051 compatible device I am
using (CY68013) does not make it clear if instruction RAM and data
RAM are separate or overlap in the first 128 bytes. At least not
that I can see.


IRAM = internal RAM, not instruction RAM

Quote:
The original 8051 datasheet won't help either, since the original 8051
didn't have iRAM. It had ROM.

Yes, that datasheet will help.


In 8051 terms, IRAM is a completely seperated dataspace. One part of this
space is bit-, direct- and inderect-adressable, one part direct and indirect
and one part only indirect.

This IRAM space was 128 bytes on the original IIRC and newer parts may
have up to 256 bytes.

Then there is external RAM, XRAM, which is maximum 64kB (without paging) the
address space is completely seperated from the IRAM and you even need
different instructions to access it.

To add to the confusion, newer parts sometimes have XRAM on-chip. So you
could call that internal external RAM :-(.

The Atmel AT89C51AC2 (for example) has 256 bytes IRAM and 1kB XRAM on-chip
If you add external XRAM in the bottom of the address space, the bottom 1kB
of the external RAM will not be used. So if you add a 32kB chip there, you
will end up with 32kB of usable XRAM, not 33kB.


--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)

"Remember kids, if there's a loaded gun in the room, be sure that you're the
one holding it"
-- Captain Combat
Back to top
Dave Hansen
Guest





Posted: Fri Dec 16, 2005 5:15 pm    Post subject: Re: 8051/2 data and iram memory question Reply with quote

On Fri, 16 Dec 2005 15:51:30 +0100 in comp.arch.embedded, "Meindert
Sprang" <mhsprang@NOcustomSPAMware.nl> wrote:

Quote:
"Bob" <bob3635x@yahoo.com> wrote in message

I don't think so. The original 8051 didn't even have internal iRAM.

Well, maybe you mean something different with IRAM, but there is the
internal data ram on the '51, which is 128 bytes in the 8031/51.
And my compiler calls that idata, as opposed to xdata for the external data
ram.

Actually, there are _three_ RAM memory spaces, identified in the
compiler I used as data, idata, and xdata. The first is the first 128
bytes of internal RAM, which are accessible either directly or
indirectly. The next (idata) is the second 128 bytes of internal RAM,
and can only be accessed indirectly (thus idata readsas "indirect
data"). Accessing this memory space directly gets you the SFRs rather
than RAM. Then, as you say, there is external RAM (xdata), only
accessible through (one of) your DPTR register(s).

IIRC, the linker was smart enough to bleed idata variables into data
space if there was room, since data is indirectly accessible, but
declaring a variable idata would force the compiler to access that RAM
indirectly, since it had to assume it was in idata space.

I know that idata was not available on all version of the '8051' (I
believe it was introduced on the 8052, BICBW). It _was_ on all the
versions of the micro I actually used.

Regards,
-=Dave

--
Change is inevitable, progress is not.
Back to top
Neil Kurzman
Guest





Posted: Sat Dec 17, 2005 9:15 am    Post subject: Re: 8051/2 data and iram memory question Reply with quote

Bob wrote:

Quote:
Meindert Sprang wrote:
"Bob" <bob3635x@yahoo.com> wrote in message
news:1134734563.317127.107870@o13g2000cwo.googlegroups.com...
Meindert Sprang wrote:
"PagCal" <pagcal@runbox.com> wrote in message
news:EsSnf.78$Vr.51@fe06.lga...
Does iram overlap the 128 bytes of the data space or is it seperate?

In other words, does an indirect reference to 0, reference data at 0?

What is it with you guys? Don't you read datasheets anymore?

What datasheet? The datasheet for the 8051 compatible device I am
using (CY68013) does not make it clear if instruction RAM and data
RAM are separate or overlap in the first 128 bytes. At least not
that I can see.

The original 8051 datasheet won't help either, since the original 8051
didn't have iRAM. It had ROM.

The MCS51 family manual tells you all this stuff.

I don't think so. The original 8051 didn't even have internal iRAM.

It describes the '51
family architecture and together with the device specific datasheets you can
find anything you want to know about the '51 and it's derivatives.

There are a lot of 8051 derivatives out there. My experience is that
the datasheets leave some gaps.

The Intel 8051 Always had IRAM It was just a different way to address the RAM.
Indirect as opposed to direct. MOV as opposed MOV @R0
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB