How can I establish what RAM I need...and therefore which PIC.


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    I use MicroCode Studio Plus... I think it tells you the memory used in the Status Bar.

    Where? I don't see it.

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by circuitpro View Post
    Where? I don't see it.
    It tells you in the status bar, here. But you have to have it turned on with:
    Code:
    Define Measure 1
    (and include the include file, of course)

    Name:  Test2.JPG
Views: 1337
Size:  66.4 KB
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    Bottom left hand corner after you compile.

    Success:blablabla bytes used.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Red face

    Oh, there it is! That's telling you how much flash/program memory you're using, right? Is there a way to see or monitor your RAM useage?

  5. #5
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by circuitpro View Post
    Oh, there it is! That's telling you how much flash/program memory you're using, right? Is there a way to see or monitor your RAM useage?
    That's right, its program data not RAM. Unfortunately I do not know of a clean way to read how much ram you are using. But someone taught me a trick of:
    Code:
    test var byte[96]
    And if it is too big to fit, make it smaller. The size allowed in the program will be the amount of RAM you have left.
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/showthread.php?t=10381
    Talks about RAM.
    I never did fix the little program in the thread though
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,623


    Did you find this post helpful? Yes | No

    Default

    Hi Hank,
    Each character within double quotes of the debug statement eats three bytes of program memory. Counting the number of characters in that single line you posted makes for 70 characters or 210 bytes worth of program space.

    The Debug statement itself seems to eat 52 bytes but it's a "one time deal" ie, it doesn't cost you 52 bytes each time you use DEBUG. (It might cost you a byte or two depending on where in the program they are placed.)

    There may be ways around this (search for Strings in codespace) but if you just need "a couple" of more bytes then try to reduce the number of characters in your DEBUG statements.

    If you do look at the Strings in codespace threads I'd be interested in what you come up with. I'm pretty much having the same issue but using ArrayWrite. The problem with Strings in codespace are they are strings (constants) and I haven't yet figured out how to mix them with numeric values "printed" with the DEC modifier etc.

    /Henrik.

  8. #8
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Talking

    Very nice tool, Dave. Thanks very much!

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