Briefly, maximum number of vars?


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Chris Barron View Post

    I do have an ASM interrupt.
    In the interrupt I use indirect addressing to load an array
    Just for confirmation I have reverted to a previous interrupt routine which does not use indirect addressing, does not access the FSR's at all. The same problem is happening.

    Would someone be able to tell me what is the best way to force PBP to locate my variables in places which I know will all my LONG and WORD arrays to fit on one bank of memory

    Chris

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    There was a thread awhile back where someone was having the same trouble, to many variables. Sounds like this is the same thing.

    Maybe a work around would be to scale things in your code and SDFS by not declaring some of the pins as VARs.

    An example would be in SDFS if you are not using the card detect
    Code:
    SD_CD		Var	PORTB.4	' SD card detect
    SD_CD_TRIS	Var	TRISB.4	' SD card detect direction
    to comment that portion out. Probably some things in your code that could be re-done also???

    Just thoughts.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    BTW, are you using the SDFS from MElabs? The one for FAT16 or the one from Jeremy posted on the forum, SDFS32.

    Maybe seeing your code would help too.
    Dave
    Always wear safety glasses while programming.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    There was a thread awhile back where someone was having the same trouble, to many variables. Sounds like this is the same thing.

    Maybe a work around would be to scale things in your code and SDFS by not declaring some of the pins as VARs.
    Just thoughts.

    I could do that, but I would rather not be limited to a smaller number of variables than I have ram locations for.

    I would post the code, but it's over 40k now. Take out the data tables and it's down to about 28k, so it's still a massive post ! The essence remains the same though.

    I'm using the FAT16 MELabs version of SDFS. If the FAT32 version uses less space and doesn't have the same caveats I would like to try it out, but even after that I still would like to include more variables.

    As I've said, the number of ram variables declared seems to be deciding factor and the problem doesn't seem to be affected by the number of aliases. I might consider declaring some large byte arrays and then declare the current individual byte vars which I am using as aliases of the larger array.

    Chris

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts