help - symbols with portc - picaxe28x1

kittygobeep

New Member
How can I assign a symbol to a portc output pin?

For example, something like this works:

Code:
symbol fish = 0
high fish
pause 1000
high portc 1
...and I'd like to use a symbol with portc too, but I've found the following does not work:

Code:
symbol blue =  portc 1
high blue
...because I get a syntax error in the line "symbol blue = portc 1".

Please help - how can I use symbols with portc (if it makes any difference, I want to use all of portc as outputs, in this way...)?
Thank you...
 

westaust55

Moderator
Dave-nz2 is correct.

from the manual 2
Symbols can be assigned to constant values, and can also be used as alias names for variables
So the SYMBOL command cannot be assigned to an IO as in portc 1
but can be used for the constant value part, ie the 1 (pin number)
 
Top