May program change itself?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

I would like to know, if it is possible that program on ATmega modify itself. E.g. there is "jmp" in some place in memory, and in some part of program we change that cell of memory, so there is no more "jmp" but some other instruction.

Regards,
CypressValley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can use a bootloader, is that what you mean?

You cannot change 1 "cell of memory" but a whole page at a time.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It takes some time, and there's a maximum number of times you can change the contents of any given part of flash (about 10,000). Read the section in your datasheet about bootloader support.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org