Twillight zone ....
Code:
  Select Case oldState
    Case 3
    If NewState = 6 THEN dir=up         
    If NewState = 5 THEN dir=dn
  
    Case 5
    If NewState = 3 THEN dir=up        
    If NewState = 6 THEN dir=dn
  
    Case 6
    If NewState = 5 THEN dir=up        
    If NewState = 3 THEN dir=dn
  END SELECT
No matter what I do, portb.1 goes high and low .... portb.0 don't change ....