for a special need for speed i wrote a code loop as shorter as possible ,the probleme is how to exit from this loop ? i would use the interrupt mode which works correctly just first time , others time no more works. i presume
a misuse of interrupt command
on other part in the interrupt cell code i put a "setint off" because when exiting "motor loop" i must cancel the return from interrupt ,to permit a return to main program and not back where interrupt occurs on the loop
above here is a part of my code . i can't add anything on the motor1 loop code
main:
gosub switchestest
goto motor
motor:
setint %11111101,%11111101,D 'start interrup watching
motor1:
readadc10 canaladc , potentiometre 'read value to potar1
pulsout pulsadr , delai pauseus potentiometre'send pulse to motor
goto moteur1 'loop to motor1
interrupt:
setint off
goto main
a misuse of interrupt command
on other part in the interrupt cell code i put a "setint off" because when exiting "motor loop" i must cancel the return from interrupt ,to permit a return to main program and not back where interrupt occurs on the loop
above here is a part of my code . i can't add anything on the motor1 loop code
main:
gosub switchestest
goto motor
motor:
setint %11111101,%11111101,D 'start interrup watching
motor1:
readadc10 canaladc , potentiometre 'read value to potar1
pulsout pulsadr , delai pauseus potentiometre'send pulse to motor
goto moteur1 'loop to motor1
interrupt:
setint off
goto main