Ok Darrel i´ve found the error.
I changed the program like this and it´s working perfect.
DISABLE
myint:
RBCpins = PORTB
INTCON.0 = 0
if rbcpins.7 <> Lastpins.7 then
dpo1 = 0
for lp = 0 to 20
pause 1
next lp
dpo2 = 0
for lp = 0 to 40
pause 1
next lp
dpo1 = 1
dpo2 = dpo1
endif
if rbcpins.6 <> lastpins.6 then
dpo2 = 0
for lp = 0 to 20
pause 1
next lp
dpo1 = 0
for lp = 0 to 40
pause 1
next lp
dpo2 = 1
dpo1 = dpo2
endif
RESUME
ENABLE
Maybe the error comes from the subroutine. I include the subroutine directly and it works fine.
Thanks a lot Darrel
PS: How you insert a code in a window like you posted it before ?
Bookmarks