In this chapter, we will look at how the PIC can be used to vary the speed of a DC (direct current) motor. This will involve creating a square wave output and varying the mark, or on, time of the waveform. This is termed PWM (pulse width modulation). We will learn how we can use the output of a variable resistor to vary the speed of the DC motor.
We will then move on to the servo motor. We will learn how it works and how we can use the PIC to vary the position of the servo. This will initially use the ...