Skip to main content
fxdif
Associate II
August 3, 2004
Question

Reading/ Writing to the EEPROM problem

  • August 3, 2004
  • 2 replies
  • 827 views
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
August 2, 2004
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
August 3, 2004
Posted on August 03, 2004 at 06:02

this might help (Cosmic compiler only):

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

Regards,

Luca