Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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?
 

MrX

Newbie level 3
Joined
Mar 19, 2003
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
20
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?
 

silvio

Advanced Member level 3
Joined
Dec 31, 2001
Messages
716
Helped
105
Reputation
210
Reaction score
16
Trophy points
1,298
Location
Romania
Activity points
11,497
Hi MrX,

http://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
 

MrX

Newbie level 3
Joined
Mar 19, 2003
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
20
Thank you.

Thank you.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top