Varible Indexing

Thread Starter

JSBIII

Joined Jan 19, 2010
2
Hello,

I need help with establishing a method of using a varible to index a For Next Loop.

Example:

IF Input = 1 THEN
FOR XX = 0 to 3
PORTB.XX = REGISTER.XX
NEXT XX
ENDIF

I have tried variations of this example but I can not transfer the state of PORTB.0 - 3 to the REGISTER. I am using PICBASIC Pro and a PIC16F628.
Does anyone have any suggestions?

Thanks
 
Top