Storing data

What is the easiest way to store data? SD card is not an option.

I tried a little with EEPROM 24cl256 but i didn't made what i am up to.

Say you have an integer (and say it is 8) and you want to store it somewhere no matter how many times MCU will be restarted. From time to time there is a need to change this 8 to 12 and to save it for latter, and again no matter for MCU's resets. After a time it had to be changed to 156, and after that to 566 or so? And to read it if it had to.

Some advice or a link would be nice.

How much data?
For how long?

Let's say every hour increment with one.

If you're using an AVR, what's wrong with the built-in EEPROM?

Nothing. I am here to learn.

And beside, maybe it gonna take a 10 yrs of writing. And increment all the way.

Built-in is ok. It's just that i don't know how to save some numbers and read them when i need it. Numbers as integer and not HEX.

who_took_my_nick:
I tried a little with EEPROM 24cl256 but i didn't made what i am up to.

Huh?

Use RAM unless there’s a reason.
Assuming the board gets powered off, or restarted daily, save to EEPROM.
e.g. for any reason once a day, 100K days is probably longer than the project will be around.
Even twice a day will start to be a problem in ~136 years.

RAM is ‘better’ for active runtime storage.
It’s faster and doesn’t ‘wear out’

EEPROM should only be used for ‘persistent’ non-volatile storage when the processor is unable to run.
It’s slower, and has a limited number of write cycles.