Hi Guys
I try to do my own research, but some questions I can’t express well into Google.
Basically, I’d like to know if I’m correct about some things I just assume at the moment.
If you declared variables n and i as above in the top line,
and your program never used either of them, the compiler would discard n at compile time, but the value 10 in i would consume RAM at program run time because you put a value in it.
Code:
unsigned char dataa[10]={0,1,2,3,4,5,6,7,8,9};
const unsigned char datab[10]={0,1,2,3,4,5,6,7,8,9};
If you declared arrays dataa and datab as above, the reason datab array can’t be written to is due to being stored in a program memory area.
Thanks