O.K. after reading my post i realize how stupid i'm now ;(
encoder is connect to PORTD.0 and PORTD.1
here's the code:
Code:
value=127
GetInitial:
OldPos = PORTD & $3
NewPos=OldPos
while (NewPos==0) or (NewPos==3)
NewPos = portd & $3
wend
select case NewPos
case 1
select case OldPos
case 0
value=value+1
case 3
value=value-1
end select
case 2
select case OldPos
case 3
value=value+1
case 0
value=value-1
end select
end select
lcdout $fe,$c0,dec value
goto GetInitial
Any improvement will be apreciate. But it works really well
sorry for that
regards
Last edited by mister_e; - 12th October 2004 at 04:42.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks