strange behavior on my prog !

hello

just to clarify a bit. There are three types of memory in the atmega8:

  • Flash memory: it's a rewritable non-volatile memory. this means that its content will still be there if you turn off the power. it's a bit like the hard disk on the arduino board. your program is stored here.

  • RAM: it's like the ram in your computer.its content disappears when you turn of the power but it can be read and writter really fast.

  • EEPROM: it's an older technology to implement rewritable non-volatile memory. it's normally used to store settings and other parametres.

remember that only a few years ago flash memory was expensive and very few microcontroller had one. it was common to use OTP memory, which is a type of memory that can ony be written once and can't be reporgrammed anymore. in this situation if you want to store settings or parametres you need an EEPROM.

Lastly when you desing a product, let's say an egg timer, that you manufacture in large quantity it is normal to buy the processors pre programmed (masked) by the factory. in this case not even a nuclear explosion will change the content of the program and the eeprom comes handy.

The link that mellis sent you allows you to use the program memory to store arrays which is very useful. We're using this technique to store strings for a UI prototype we're building for an appliance manufacturer.

hope this cleared the air a bit :slight_smile: