How to use PIC18F4550 to control a servo motor?
Hi… I am new to microcontroller. Recently, I was given a task to use a PIC18F4550 to control a servo motor. How can this be done? I’ve damaged quite a few of them in my school lab. I heard for a servo motor, the PWM on time for its centre position is 1.5ms. I am required to activate a laser pointer (at RC0) when it is at its centre position. This servo motor will have to move back and forth for 5 times. I.e. it will act like as if it’s performing a scanning. I am not sure if a threshold is required; if it’s needed then it’ll be 3.5V. Can somebody please help me out? I need a sample program to try things out. I’ve tried searching online but I couldn’t find any one of them for this particular PIC. I am in a desperate position because I’ve been trying doing this for a few weeks but I still couldn’t get it done and it’s due soon. Really appreciate if you can help.