I have a program running on an 18F26J50, and use about 30 Vars, mostly byte sized, and about 15 of them are declared as 6 byte arrays.
The code runs great and I want to include the SDFS file system code for SD Cards. I have previously used this code successfully and find it is easy to work with.
I have begun by copying in the list of variables and aliases. However, if I copy in all of the SDFS vars my program runs as normal except that some data is being corrupted. The data is held in buffers, and represents led segment patterns on a display. If I comment out, say, 20 of the SDFS variables then my code works, and if I leave them in the led display shows some garbage at exactly the same point each cycle.
Is there a limit to the number of variables which you can declare ? Knowing I would need a lot of vars I used the 18F26J50 because of it's 3k of SRAM and as far as I can tell I am probably only close to using 1k of Ram at the moment.
I've tried lumping arrays together (not that it should matter) and rearranging the order of the SDFS vars before my own, but the effect is always the same.
The effect is not specific to those particular vars which I comment out either, if I comment out any 15 or so of the SDFS vars my code begins to work again.
Chris
Bookmarks