This document describes a Pulse Width Modulation (PWM) program for a PIC microcontroller. It initializes the microcontroller's clock and ports, then sets up PWM output on pin RC3 using Timer 2. The PWM duty cycle is varied from 0 to 255 and back in a loop, and the output pin is also switched between RC3 alone and RC3+RC2 to steer the pulse.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
158 views
PWM C
This document describes a Pulse Width Modulation (PWM) program for a PIC microcontroller. It initializes the microcontroller's clock and ports, then sets up PWM output on pin RC3 using Timer 2. The PWM duty cycle is varied from 0 to 255 and back in a loop, and the output pin is also switched between RC3 alone and RC3+RC2 to steer the pulse.