Today,we are learning to implement PWM (pulse width modulation) using AT89s52, a microcontroller from 8051 family. Pulse Width Modulation can be used to vary the speed of a DC motor varying the width of the pulse provided to motors.Increasing the width of pulse provided to the motor increases the speed of the motor while decreasing the width of the pulse supplied to the motor decreases the speed of the motor.