Hello Alessandro Marzini. > LOOP > movlw 0xFF > movwf PORTB 2 clocks are carring out > > > clrf PORTB 1 clock is carring out and zero flag in STATUS is set > > > goto LOOP Carefully check your delay routine code. Probably you test zero flag within it and second case with zero on input result to less/ /greater delay. For the other hand you may substitute second clrf PORTB with movlw 0 movwf PORTB and check the result. WBR Dmitry. PS. Using bsf/bcf instructions on real i/o port is definitly not recommended. In situation with mixing in and out pins on the same port it may result to writing to port undesirable value. This also related to any Read/Modify/Write_back commands. It will be better to use shadow register and only write to port output value with reading from shadow.