avr - From PROGMEM to Flash Memory of Arduino -


I am trying to get some help because I use the code of someone else (which uses promimm) Moving to my flash memory.

So here are my questions: This is the original code segment:

  prog_uint8_t image [image column] [LEDs] PROGMEM = {{B11111111, B11111111, B11111111, b1111111111 , B 1121111, b 112111111, b 112111111, b11111111, b 112111111}, {b, 112111111, b 101010111, b 10101001, b11111111, b11111111, b11111111, b11111111, ba11111111, b1111111111}};  

This is my modified code:

  const int image [image column] [LEDEights] = {}; I tried to compile it using another's laptop, and then it actually became stricter, but I saw it and found out that the program is impossible for the outlook to revolve. Is my revision correct?>?  

I can not completely say that the whole code will work, due to: (I know that this is something to do with the AVR-GCC BlobAbaba program, is not it? I have something about it Time has read for a minute ago.).

Code: prog_uint8_t imageEights = pgm_read_byte (& amp; (image [column] [eight]));

If this will not work, how to read a byte from SRAM?

Your question is not very clear. If you want to switch PROGMEM with only the existing code using Flash Memory, then you are close to - except that you are starting that blank array.

You are right that you can not change PROGMEM on the runtime.

This works:

  int image [] [9] = {{B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, B11111111} , {B11111111, b 10110111, b 10101001, b 112111111, b11111111, b11111111, b11111111, b11111111, b11111111}};  

Comments