Hello I have a Mega2560p, with a pretty in-depth and long program onboard. The code all works.... except I am finding that random variables are starting to be overwritten (falses becoming true). Its not the code. I have followed the code, and added shortcuts and I think it was the last SD card text retrieval routine that has started to mess things up.
I have included just the declared variables here that I think are the culprit. There are a LOT of variables in this code. Memory is at 60% I think, and prog at 72%... If I remember rightly. Not maxed out by any means. I moved all my LCD text to ProgMem and that helped greatly early on in the coding.
One of the last variables I declared was 'char Ins_text;' I am suspecting this. Where would it write these variables, and can I tell it where to begin writing them? Also, is there any way of knowing what addresses are free?
Any direction greatly appreciated. The code is SO long and SO messy, I seriously doubt you need to see it for this particular question
char Ins_text; //Instructions text line byte Datapage; //What page of instructions are being displayed byte text_line; byte DataNo; //Number of data files for information