Hi Faruk, welcome to the list. Create a counter that will count up or down between 0 and 7. For the stepping up you can call the following subroutine: STEPOUT INCF COUNT,W ;or DECF for other direction ANDLW 0X07 MOVWF COUNT CALL STEP MOVWF PORTB ;pins RB0 to RB3 are the stepper pins ;ADD YOUR OWN DELAY HERE TO CONTROL SPEED, MINIMUM IS ABOUT 10Ms (FASTEST STEP) RETLW 0 ;and go back see if button is still pressed, ;if so, call STEPOUT again ;select one of the STEP routines below according to your needs (use only one!) ;HALFSTEP, SLOWER, MORE POWER STEP ADDWF PCL,F RETLW B'00000001' RETLW B'00000011' RETLW B'00000010' RETLW B'00000110' RETLW B'00000100' RETLW B'00001100' RETLW B'00001000' RETLW B'00001001' ;FULLSTEP, FASTER, LESS POWER STEP ADDWF PCL,F RETLW B'00000001' RETLW B'00000010' RETLW B'00000100' RETLW B'00001000' RETLW B'00000001' RETLW B'00000010' RETLW B'00000100' RETLW B'00001000' Nice to share something that I've learned from this list a long time ago and still use. :) Quentin