CCS C and Microchip PWM – Pulse Width Modulation

Tonight I was wondering why my PWM wasn’t working. It took me a while to figure it out, but I have it working.

Start with your C file with your normal #include and #fuses. Inside your main function you’ll use 4 built in functions and the super loop While statement. That is it! I wired a high brightness LED to pin 5 of the PIC16F690 on the Pickit 2.
Continue reading