I thought that I could add some more tests I have done: (BTW, still having problems!!) [PORTA : INPUT, PORTB: OUTPUT] Main MOVLW h'06' MOVWF PORTB NOP ; up till here it is fine! ; an LED on portb<1> is on ; and the motor starts turning ; the following: WaitHere CALL Delay2 BTFSC PORTA,1 GOTO Finish GOTO WaitHere Finish CLRF PORTB CALL Delay2 END ; even with a high on porta<1> there is no stopping the motor nor the LED. I still think that there is something stopping the PIC from changing values in portb??? Please help me!! Thanks again. +--------------------------+ | Sep Seyedi | | -> me@sep.2y.net | | -> http://sep.2y.net | +--------------------------+