Skip to main content
fxdif
Associate II
Aug 3, 2004 4:02 AM UTC
Question

Reading/ Writing to the EEPROM problem

Posted on August 03, 2004 at 06:02

Reading/ Writing to the EEPROM problem

This topic has been closed for replies.

2 replies

fxdif
fxdifAuthor
Associate II
Aug 2, 2004 12:32 PM UTC
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 II
Aug 3, 2004 4:02 AM UTC
Posted on August 03, 2004 at 06:02

this might help (Cosmic compiler only):

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

Regards,

Luca