It is possible to use variables to name ports then change variable values to change ports. copied from my program --
http://www.harbornet.com/sunflower/PCB.pbp
' The PORTL and PORTH aliases are used for the PIN numbers (0-15)
' PORTL is 0-7 and PORTH is 8-15.
' Look in the .bas and .bal files for the chip you are using.
' If it's a 18F4620 then open c:\pbp\18F4620.bas
' PORTL VAR PORTB
' PORTH VAR PORTD
' TRISL VAR TRISB
' TRISH VAR TRISD
'
' PORTB AND PORTD can now be referenced by variables.
' http://www.picbasic.co.uk/forum/showthread.php?t=14493&
'
The default, I believe, is PORTB AND PORTC. The above changes in .bas and .bal changed that to ports B and D. The link explains in more detail
Bookmarks