Hello friends,
I am trying to store variables in internal eeprom of atmega32. I have written program to write and read the internal memory. I have attached the source code for your reference ( already scanned using licensed quick heal anti virus).
In my program I have created to functions
1. To write data to specific eeprom address.
2. To read data from specific eeprom address.
I am using a bit variable to control the eeprom write operation.
In while(1), I am checking values read from eeprom with the values I have written to it. If the values are matched, then only I am displaying them on hyperterminal.
I have executed the program in following fashion.
Case 1. When eeprom_write_enable is set to 1
The hyperterminal shows output as
AA0000000000AA00000000000..
The 2 AA chars are used to indicate 2 write operations to eeprom.
The continuous 0s is the value I have written to the
memory location 0x10 of eeprom .
Questions:
1. Why I am not getting second byte written to the memory location 0x20 which is 1.
2. Why the chars AA are repeated in string even when I am not calling the function: write_eeprom_byte() again in while(1)?
Case 2: When eeprom_write enable is set to 0.
I don't get anything on hyperterminal.
Since data written to eeprom should persists after power off, i am expecting the data values 0 and 1.
Question: Why I am not getting the data values when writing to eeprom is disabled and performed only once?
Thanks in advance.