Code:@ DEVICE pic16F628A, INTRC_OSC_NOCLKOUT, MCLR_OFF
CMCON = 7
Counter var Byte
Counter = 0
Routine:
For Counter = 0 to 6
High PortB.Counter
Next Counter
pause 500
For Counter = 0 to 6
Low PortB.Counter
Next Counter
pause 500
GoTo Routine
Apparently:
andCode:High PortB.Counter
is giving me errors, I could have done this with no errors:Code:Low PortB.Counter
but this will be a PICBasic command and I will not be able to control PortA.Code:For Counter = 0 to 6
High Counter
Next Counter
How do I use the For Next Loop to handle PortA too ?
Hi,
PortA.something ... something must be a CONSTANT ...
so, try indexing PortA
Should compile fine.Code:PortA.0[counter] = 1
; OR
HIGH PortA.0[counter]
Alain

