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.
Bookmarks