Zur Übersicht - INFO - Neueste 50 Beiträge - Neuer Beitrag - Suchen - Zum C-Control-I-Forum - Zum C-Control-II-Forum

Re: How do you write/read signed integers to/from internal EEPROM? Kategorie: Programmierung C (von ulrich korth - 19.10.2010 18:40)
Als Antwort auf How do you write/read signed integers to/from internal EEPROM? von PepeV - 19.10.2010 17:17
Ich nutze:
C-Control Pro Mega128, CC-Pro 128 Application Board, Pro-Bot128
> Hi all,
>
> I want to write signed integers to the internal EEPROM of the MEGA128 and then read them and
> send them to the output window of the IDE. All this off course with minimal code (in cc).
> I tried this:
>
> int i;
> i = -42;
> EEPROM_WriteWord(EEPROM_addr, i);
> Msg_WriteInt(EEPROM_ReadWord(EEPROM_addr));
>
> This works with i from -209 to 209 but other values give unexpected results. Why?
> Has anyone a suggestion for an alternative?
>
> Thanks for any help.
> Pepe
Hi Pepe,
what is EEPROM_addr? Can be only 1...(4kB-32) for Mega 128!
Ulrich


    Antwort schreiben


Antworten:

Re: How do you write/read signed integers to/from internal EEPROM? (von PepeV - 19.10.2010 20:27)