cancel
Showing results for 
Search instead for 
Did you mean: 

Reading/ Writing to the EEPROM problem

fxdif
Associate II
Posted on August 03, 2004 at 06:02

Reading/ Writing to the EEPROM problem

2 REPLIES 2
fxdif
Associate II
Posted on August 02, 2004 at 14:32

I'm trying to read and write to the EEPROM with no sucess. This is my code

unsigned char *EEPROM = (unsigned char *) 0x1002;

//Write

EECSR = 0x02; //EEPROM write mode

* EEPROM = 0x20;

EECSR = 0x03; //Start Programming cycle

while (EECSR & 0x01);

//Read

EECSR = 0x00; //EEPROM read mode

cIDischarge = *EEPROM;

Is there anything I need to add to the linker file to include to EEPROM memory?

TIA
luca239955_st
Associate III
Posted on August 03, 2004 at 06:02

this might help (Cosmic compiler only):

http://www.cosmicsoftware.com/faq/faq13.php

Regards,

Luca