Program space / flash / PROGMEM read only?

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

After spending time learning how to utilize program space as RAM I have been advised ( by compiler) it can be used as read only.

Since it is loaded on initial sketch download it seems reasonable.

Sure would like to confirm that from the forum.

 

This topic has a solution.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's not quite read only. There is a very convoluted technique called SPM (Self Program Memory) an AVR can do to write its own flash at runtime but this is usually only used to update program code not data (using a "bootloader") because (a) it has to be done page-wise not byte-wise and (b) each page can only be erased/written a max of 10,000 times during the entire life of the device. 

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

Thanks, decided to look for my old Basic Stamp SPI RAM module I build and never used. But it was an interesting experience.