Hi Roy,
Unfortunately, not all commands work with a variable index pointer to the port pin.
For bit-twiddling - you can do something like this;
Code:
Index VAR BYTE
TRISC = 0
Main:
FOR Index = 0 TO 7
PORTC.0[Index] = 1
PAUSE 100
PORTC.0[Index] = 0
PAUSE 100
NEXT
GOTO Main
END
If you search here for port & pin indexing you'll find a TON of various ways to index pins.
Here's one http://www.picbasic.co.uk/forum/showthread.php?t=3753
And here's another that gets really interesting when Darrel steps in with his VirtualPort thing-a-ma-bob.
http://www.picbasic.co.uk/forum/showthread.php?t=4074
P.S. Welcome to the forum....;o}
Bookmarks