PBP RAM allocation - how to find available or total used RAM?


Results 1 to 19 of 19

Threaded View

  1. #8
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: PBP RAM allocation - how to find available or total used RAM?

    I meant filling all of the RAM you declared yourself within PBP in a for loop (within PBP) first.
    If all of the RAM is delayed as arrays, this is easily done with a for next loop.
    Then even if you didn’t want arrays, you could still alias the individual elements and forget they are array elements.

    I’m assuming that PBP will put all of your variables after it’s own system variables, even if they are scattered,
    which I believe it always will.

    Code:
    byte i
    byte PBPvar
    
    FOR i = $20 TO $80
    
    @ movf _i , W
    @ movwf FSR
    @ movf INDF , W
    @ movwf _PBPvar
    
    LCDOUT “PBPvar"
    
    NEXT i
    If your pic has greater than 8 bit registers you can set the high byte once, outside of the loop.

    This is not tested of course, but the basic idea.. list locations 0x20 - 0x80 (and I don’t actually know where your RAM is in the 18F chip).
    bank switch in PBP and repeat.
    Last edited by Art; - 12th November 2016 at 10:50.

Similar Threads

  1. Need Help ON the SPI F-RAM....
    By hankshone in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th February 2010, 18:29
  2. RAM not reseting
    By InitialDriveGTR in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd January 2010, 19:24
  3. RAM test
    By Sach_1979 in forum General
    Replies: 0
    Last Post: - 24th September 2009, 22:12
  4. Ram Gets Cleared
    By ljubex in forum General
    Replies: 2
    Last Post: - 6th November 2005, 23:38
  5. And last but not least: static ram?
    By bearpawz in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st November 2004, 04:37

Members who have read this thread : 1

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