Is it possible to make an array, where each element equates to a non-consecutive port.
Example:
RELAY VAR BIT[10]
' (obviously, this doesn't work, but it does crash the compiler)
SYMBOL RELAY[1] = PORTB.6
SYMBOL RELAY[2] = PORTC.4
SYMBOL RELAY[3] = PORTD.2
...
' cycle through relays
for i = 1 to 3
RELAY[i] = %1
PAUSE 1000
RELAY[i] = %0
PAUSE 300
next i
Bookmarks