loop:
if portb.1=0 then                 'here is switch 1 of the rotary encoder
    counter=counter+1
    goto lcd
endif
 
if portb.0=0 then                 'here is switch 2 of the rotary encoder
    counter=counter-1
    goto lcd
endif
 
goto loop
 
lcd:
lcdout $fe,$c0,dec5 counter
while (portb.0=0 or portb.1=0):pause 10:wend
goto loop
Common of the encoder is Low and Pull Up is supposed to be active.
Ioannis


 Menu
 Menu 
			
			
 
			 
			 
			
Re: 16F690 MCLR as Input
many thanks Henrik to clarify this post.
jackberg1 - 27th October 2025, 20:42that make more sense to me now with further test, when the pin RA3
has nothing connected to it, the input is floating thus
when adding a pulldown it's...