Quote Originally Posted by flotulopex View Post
Code:
btn_x = VAR BYTE
btn_x = PORTB & %00111110
That is a one-time calculation. It never changes in your loop. You've got to update btn_x in the loop if you don't want a never-ending loop.