Question: why pwm is needed in microcontroller?
Answer: PWM is a technique used to generate analog output signal using digital signals. It is commonly used to control average power delivered to a load, motor speed control, generating analog voltage levels and for generating analog waveforms. CCP Modules are available with a number of PIC Microcontrollers.