Generating PWM with PIC Microcontroller using Hi-Tech C
PWM (Pulse Width Modulation) is a powerful technique used to generate analog voltage using digital signals. It has a wide variety of applications such as controlling average power delivered to a load, generating analog voltage level, sine wave generation and DC Motor speed control. PWM signals are ON-OFF signals (hence the name Pulse) whose ON duration are changed (hence Width Modulation) according to our requirements. The fraction of time period for which the signal is ON to total time period is termed as Duty Cycle.
CCP Modules are available with a number of PIC Microcontrollers which can be used to generate PWM waves. CCP Stands for Capture/Compare/PWM. For programming this module in Hi-Tech C we should require a good hardware knowledge. Here for demonstration we are using PIC 16F877A.