Hi Anand,
When you create a variable for a port like PORT VAR PORTB or PORT VAR GPIO, all you're
doing is creating an alias to the port. It doesn't create a variable in RAM like it would for
something like X VAR BYTE.
Look at the screen capture attached. Check out the address for _PORT, GPIO, _X and _Y.
X and Y are variables in RAM. _PORT is just another name for the physicall address of GPIO.
It's not a variable created in RAM. Just an alias to the port address.
Running animations in MPLAB for PBP programs is a bit different than using it with assembly.
If you run something like what's shown in my screen capture, and hit animate, it will show
the green cursor on each line as it executes. Now insert a PAUSE 1 just after PORT = X.
When it lands on the PAUSE 1 it calls the PBP library routine, so the library window opens
and you don't see it execute the PAUSE 1 in the BASIC source window. It's only going to
show inline type commands. Calls to PBP library functions aren't shown in the source code
window. That's why the library window pops up.
Using MPLAB with PBP takes a bit of getting used to, but it's worth the effort.
Bookmarks