EmbeddedRelated.com
Forums
Memfault Beyond the Launch

AT89C51RD2: 64k or 62k flash?

Started by aleksa May 31, 2009
AT89C51RD2 has 64k flash + 2k ROM.

Can I use all 64k with:
 1. FLIP
 2. API
or do FLASH and ROM overlap?

My MCU hasn't arrived yet, so I can't check this.

TIA
On Sun, 31 May 2009 01:26:02 -0700 (PDT), aleksa <aleksaZR@gmail.com>
wrote:

>AT89C51RD2 has 64k flash + 2k ROM. > >Can I use all 64k with: > 1. FLIP > 2. API >or do FLASH and ROM overlap? > >My MCU hasn't arrived yet, so I can't check this.
Surely this information would be in the AT89C51RD2 datasheat ? Regards Anton Erasmus
aleksa wrote:

> My MCU hasn't arrived yet, so I can't check this.
Ahem ... how exactly does not having the MCU in hand keep you from studying the data sheet?

aleksa wrote:
> AT89C51RD2 has 64k flash + 2k ROM. > > Can I use all 64k with: > 1. FLIP > 2. API > or do FLASH and ROM overlap?
A scorpion has six legs. A spider has eight legs. Or is it vice versa? I have to know that.
> My MCU hasn't arrived yet, so I can't check this.
http://despair.com/cluelessness.html Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Maybe google should add a standard check box to a message:
- Yes, I've read the docs.

followed by several radio buttons:
- but I want to be sure.
- but the info isn't there.
- but the info isn't clear.
- but I don't understand it completly.
- the question I have isn't addressed directly.
 etc, etc..

Then, several options would be in order:
- I expect a short, direct answer.
- I expect a wrong or misleading answer.
- I expect a question: "Why do you ask?"
- I expect a question: "Have you read the FAQ?"
- I expect a question: "Have you googled?"
- I expect an OT answer, followed by a long discussion.

I've forgot the "It-is / it-is-not homework."


Of course, I could have asked a better question,
that would give a hint that I did download, print
and read the docs, every page, several times,
including (but not limited to) other MCUs alike.

And, I should have pointed out the source of my problem.

And that is ENBOOT.

To access the API functions, one must set this bit,
thus mapping the boot ROM to 0F800h.

Now, since ROM is mapped to F800 and not FLASH,
the first thing that pops to my mind is:
since ROM and FLASH share the same address, will
the APIs be able to access the F800-FFFF of the FLASH?

Maybe, maybe not, it is not clearly documented.
If not, its not so bad, only 2k lost.

After seting ENBOOT, I can LCALL to F8xx and access the ROM.
I can (guessing) even read the ROM with MOVC.

Since they share the same address, the doc should
have stated that the APIs access the FLASH trough
a different address mechanism, if so.



Hmm.. I like my first question better.
aleksa wrote:
> Maybe google should add a standard check box to a message:
Google has nothing to do with that. Setting aside that you appear to be one more victim of their policy obscuring the difference between Google Groups and actual USENET, those check boxes belong into your brain, not on some web pages, be they Google's or any others.
> Of course, I could have asked a better question,
Strike "could", insert "should", and add some emphasis.
> To access the API functions, one must set this bit, > thus mapping the boot ROM to 0F800h.
... wherein "API" is supposed to be the programming interface of the boot loader, presumably.
> since ROM and FLASH share the same address, will > the APIs be able to access the F800-FFFF of the FLASH?
That's really strictly for the documentation of that boot loader to answer.
> Hmm.. I like my first question better.
Hmm... I don't.
"aleksa" <aleksaZR@gmail.com> wrote in message 
news:7d17105f-7218-4996-8e78-46654f2d28ba@o18g2000yqi.googlegroups.com...
> AT89C51RD2 has 64k flash + 2k ROM. > > Can I use all 64k with: > 1. FLIP > 2. API > or do FLASH and ROM overlap? > > My MCU hasn't arrived yet, so I can't check this. > > TIA
You can use all 64k flash with flip. I do on the ED2 part.... Boot loader is invoked with special hardware setup conditions on power up. A tad nasty/tricky to implement to say the least.....
aleksa schreef:
> AT89C51RD2 has 64k flash + 2k ROM. > > Can I use all 64k with: > 1. FLIP > 2. API > or do FLASH and ROM overlap? > > My MCU hasn't arrived yet, so I can't check this.
Well, then You're lucky mine arrived a couple of days ago and I am holding one in my hand right now. I have sawn it in two and it turns out the ROM and flash are not lying on top of each other, not even partly. This "datasheet thingy" others are talking about, I have no clue what it is... Good luck ;-), Rene
Rene wrote:
> aleksa schreef: > >> AT89C51RD2 has 64k flash + 2k ROM. >> >> Can I use all 64k with: >> 1. FLIP >> 2. API >> or do FLASH and ROM overlap? >> >> My MCU hasn't arrived yet, so I can't check this. > > Well, then You're lucky mine arrived a couple of days ago and I > am holding one in my hand right now. I have sawn it in two and > it turns out the ROM and flash are not lying on top of each > other, not even partly. > > This "datasheet thingy" others are talking about, I have no clue > what it is...
The datasheets are the white paper material used to cover the bleeding sawn in twain chips. Sometimes it encourages healing, and the chips can resume their previous position in the world. At other times it simply has to be closed up, and used to convey the bleeding corpses to the cemetary or crematorium. The "lying on top of each other" is purely for breeding. You have to saw at the right times. Any questions? -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home.att.net> Try the download section.

Memfault Beyond the Launch