can i use the code to control speed and position of motor using same pic?