Ok,I try modification this code:
Code:
switch var byte
main:
if portb.2 = 1 then
switch = switch +1
If switch = 1 then goto program1
If switch = 2 then goto program2
If switch = 3 then goto program3
endif
goto main
program1:
HIGH PORTB.1
PAUSE 500
LOW PORTB.1
PAUSE 500
GOTO program1
program2:
HIGH PORTB.2
PAUSE 500
LOW PORTB.2
PAUSE 500
GOTO program2
program3:
HIGH PORTB.3
PAUSE 500
LOW PORTB.3
PAUSE 500
GOTO program3
and what I need,
when I press button,JUST ONE TIME,TO, PORTB.2,
TO GO TO PROGRAM 1,
AND STILL WORKING IN THE PROGRAM 1.
when I press button,NEXT TIME,TO, PORTB.2,
TO GO TO PROGRAM 2,
AND STILL WORKING IN THE PROGRAM 2.
when I press button,NEXT TIME,TO, PORTB.2,
TO GO TO PROGRAM 3,
AND STILL WORKING IN THE PROGRAM 3,.......
THAT I NEED!!!
Bookmarks