I´ve been working on a project with arduino and a 320x240 for a long time, and until now everything had worked as expected.
Las day I uploaded a new version of my sketch and it stopped working. The screen would be static in white color or the last image it loaded.
It seamed weird since all i did was add a couple arrays to my code, nothing that could prevent it from even starting (those arrays were going to be used a while after the code started, so they werent even part of the initialization code).
I started trying out some things to get around what happend and I discovered a couple things:
-If we eliminate 11 out of the 12 arrays the code always works, no matter which ot the 12 arrays is left untouched.
-As long as the memory ussage is under 101000 bytes it works, (even it there are two of those arrays set).
-I´ve tried with two different mega boards (which are suppsoed to have 250kb of programe memory) and i get same errors with both.
I´m sorry about not posting the full code, but as you may think it´s to big to fully post.
Still here is an example array (all 12 of them are pretty similar):
const unsigned short lvlh[70] = {piedra1,edge_end1,base_block,base_block,path,path,corner_end8,edge_end2,edge_end2,corner_end2,corner_end1,corner_end6,base_block,base_block,path,path,base_block,base_block,base_block,corner_end8,corner_end6,base_block,base_block,base_block,path,path,base_block,base_block,base_block,base_block,base_block,base_block,preasure_plate,base_block,path,path,path,path,path,path,corner_end5,base_block,base_block,base_block,base_block,base_block,base_block,base_block,base_block,base_block,corner_end4,corner_end5,base_block,base_block,corner_end7,corner_end5,base_block,base_block,base_block,corner_end7,piedra1,corner_end4,edge_end4,edge_end4,corner_end3,corner_end4,edge_end4,edge_end4,edge_end4,corner_end3};
As you see, there are 70 objects in this array (all of them 32x32 images, previously defined)
Right now the full code weitghs 114494 bytes, (45%). As i said there are no compailer errors, nor errors while uploading, and the changes don´t affect the start of the program, so at least something should be displayed before the possible problems started.
I´m using 3322 bytes (40%) of RAM, leaving 4870 bytes left.
Thanks in advanced for the help,
Nick.