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 initialize the build-in EEPROM on Atmel AT89S8252

Status
Not open for further replies.

MrX

Newbie level 3
Joined
Mar 19, 2003
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
20
I have the AT89S8252, K*il (language C).
I need to place the array with messages in EEPROM.
How can I do it?
 

Hi MrX,

Read careful all topic replies:

**broken link removed**

and this one referenced in the topic above:

**broken link removed**

Regards,
Silvio
 

silvio said:
Hi Silvio.
Thank you for your answer.
I read the topics but I didn't find solution on my question.
I can do reading and writing EEPROM.
I need for method of initialization of EEPROM in compiling phase.
For example:

const char xdata STRING[] = "Hello, World!";

Array STRING will be locating and initializing in xdata segment.
How can I initialize the STRING in EEPROM?
 

Hi MrX,

https://www.keil.com/support/docs/1106.htm
This is the official answer from K**l knowledge base.

You wrote:
How can I initialize the STRING in EEPROM?

Well, C compilers don't know about EEPROM or RAM or serial EEPROM. If are memory mapped you can access as stated by you:
const char xdata STRING[] = "Hello, World!";

On software the EEPROM space is accessed with MOVX opcode, exactly like for XDATA space. The only difference is that in your access routine you must first configuring the EEMEN bit. As you already did. Thus using a pointer to point to XDATA space (either EEPROM or SRAM) which holds and array it's easy for you.

However, I think the real problem is how your programer device will manage with the EEPROM contiguous stream of 2K hex data and 8K flash data, at burning time.

Regards,
Silviu
 

Thank you.

Thank you.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top