I am just wondered which memory space (which addresses) is covered by EEPROM?
I couldn't find any information in datasheet and decided to use 0x00 as address.
Code works fine and it is possible to write to memory and read data back.
But I am still not sure how to figure out if/why this address belongs to EEPROM...
Thanks for your help!
(Newbie in programming storage...)
It varies from board type to board type. The API in <avr/eeprom.h> suggests that the valid range is 0 to E2END, which will vary depending on what board you are targeting.
The Arduino is a Harvard architecture. The memory areas aren't contiguous. You are thinking of Von Neumann architecture where everything fits in one address space.
Like house number 1 on your street is a different house to the house numbered 1 on a different street.
ATmega has separate address space and registers for EEPROM access. Valid range is 0-E2END as @MHotchin mentioned.
I couldn't find any information in datasheet and decided to use 0x00 as address.
Code works fine and it is possible to write to memory and read data back.
There is a bit more in the datasheet. Yes, 328p has 1kB = 1024B => max. address is 0x400-1=0x3FF.
Do not afraid to use E2END it is defined as 0x3FF but E2END will work also for different MCU like 168p (=0x1FF) without change in the code. EEMEM has different purpose - to define variable allocation in EEPROM.
Just adding that 1k is not 1000 in comp. terminology (as you supposed 0x3E8 is max. address). It is 1024. All numbers are power of 2, so 2^10 in this case, 2kB is 2048B etc.