the most inefficient way but easy to follow.
Code:
LOW PORTB.4
Key var byte
start:
Key=(PORTB&$0F) rev 4
If Key<>4 then Start
While key
Key=PORTB&$0F
wend
pause 50
Wait2nd:
Key=(PORTB&$0F) rev 4
if key=0 then Wait2nd
If Key<>9 then Start
While key
Key=PORTB&$0F
wend
pause 50
Wait3rd:
Key=(PORTB&$0F) rev 4
if key=0 then Wait3rd
If Key<>2 then Start
HIGH PORTB.4
Spin:
goto spin
Last edited by mister_e; - 16th July 2006 at 20:30.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks