S
Sara
- Jan 1, 1970
- 0
Dear friends ;
I am working with avr Atmega64 chip on a project .In my project i have
to save my last data in a variable in eeprom and reload it in the
flash variables when the chip is being restarted .
I program the chip with JTAG ICE STK 500 programmer.i use these code
in my program that is written in code vision for saving the data:
//variable definition
eeprom int eeGP;
int GP;
;/main function
eeGP=0x08;
GP=eeGP;
the problem is that in first programing i give a value to the eeGP and
i expect that after programming the chip if i erase the flash and
reload the program without giving a value to the eeGP the value of GP
changes to 08.(the eeprom has been programmed) but the thing happen
is that after reloading the program to the chip the GP takes the
0xFFFF value that means the eeprom hasn't been programmed.
I have enabled the fuse bit (preserve eeprom on each chip erase.
Thanks in Advance
I am working with avr Atmega64 chip on a project .In my project i have
to save my last data in a variable in eeprom and reload it in the
flash variables when the chip is being restarted .
I program the chip with JTAG ICE STK 500 programmer.i use these code
in my program that is written in code vision for saving the data:
//variable definition
eeprom int eeGP;
int GP;
;/main function
eeGP=0x08;
GP=eeGP;
the problem is that in first programing i give a value to the eeGP and
i expect that after programming the chip if i erase the flash and
reload the program without giving a value to the eeGP the value of GP
changes to 08.(the eeprom has been programmed) but the thing happen
is that after reloading the program to the chip the GP takes the
0xFFFF value that means the eeprom hasn't been programmed.
I have enabled the fuse bit (preserve eeprom on each chip erase.
Thanks in Advance