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:
and
is giving me errors, I could have done this with no errors:
Code:
For Counter = 0 to 6
High Counter
Next Counter
but this will be a PICBasic command and I will not be able to control PortA.
How do I use the For Next Loop to handle PortA too ?
Hi,
PortA.something ... something must be a CONSTANT ...
so, try indexing PortA
Code:
PortA.0[counter] = 1
; OR
HIGH PortA.0[counter]
Should compile fine.
Alain
Bookmarks