Fixed frequency, adjustable duty
19.06.2015
This is a simple test showing how to control a PWM duty and keeping the frequency fixed, by using a cheap PIC16F84 microcontroller.
A 8MHZ crystal is used in this circuit for the microcontroller.
The frequency is fixed to 50Hz, and the +duty is adjustable from 1 to 99% by two micro-switches. RA0 decrease +duty duration by 1, RA1 increase ++duty duration by 1, RA3 output PWM
RB0-RB3 connected to LCD (HD44780) D4-D7, RB4->E, RB5->RS, R/W->GND
The step value is not adjustable by user yet in this program.
The code and schematic are experimental, and must be revised before using it in your project!
This material can be used for free, but for your own risk!
A simple schematic

This schematic is self explanatory, and it is used for servo tester project also.

Bellow are the .asm and HEX files for download (right click the icon, and choose "Save Link As.." from the drop down menu)