Hi,
Having assigned a variable name to a port pin, eg:
MyPin VAR PORTB.1
I would like then to be able to use another variable to refer to that pin, eg:
x = MyPin
High x
Is there any way to do this as I have tried many ways but nothing seems to work.
--------------------
Alternatively, if this would work, I could do what I want this way:
If a = 1 then
p VAR PORTB.1
ELSE
p VAR PORTB.2
ENDIF
But, when this is compiled, it reports that the variable p in the ELSE section is already an alias implying it is assiging the variable at compile time rather than when the IF statement runs.
-----------------------
Many thanks for any help or suggestions.
Peter
Bookmarks