Author Topic: AVR atmega32a EEPROM question  (Read 1854 times)

0 Members and 1 Guest are viewing this topic.

Offline CalebMcNevinTopic starter

  • Newbie
  • Posts: 3
  • Country: ca
AVR atmega32a EEPROM question
« on: April 18, 2013, 02:30:56 am »
Hi,
does anyone know if it's possible to accidentally overwrite your program by saving data to EEPROM on an AVR microcontroller? I'm planning on generating random numbers by giving an arbitrary seed on my first power up, then using the last random number generated before power down as the new seed for the following cycles, and I don't want to screw my program up by overwriting part of it. Or am I just completely off? Is the program even in the EEPROM? :p

Thanks :D
Caleb
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: AVR atmega32a EEPROM question
« Reply #1 on: April 18, 2013, 02:35:46 am »
The program is in flash memory not EEPROM so you will be fine.
 

Offline CalebMcNevinTopic starter

  • Newbie
  • Posts: 3
  • Country: ca
Re: AVR atmega32a EEPROM question
« Reply #2 on: April 18, 2013, 02:59:00 am »
I guess my noob is showing  :-[
lol, thanks! :D
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
Re: AVR atmega32a EEPROM question
« Reply #3 on: April 18, 2013, 12:09:59 pm »
Don't forget to program the EESAVE fuse bit if you want to preserve EEPROM data between reprograms.

(By default the EEPROM data is erased everytime you reprogram the flash)

Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf