pic16f627 pwm variable duty cycle help please

Thread Starter

jimmiegin

Joined Apr 4, 2014
49
Hello.
I am new to pics . I have an 16f627 18p to hand (it came with a velleman programmer) and would like to know how if it is possible to set it up for pwm variable output to be controlled with tactile switches or maybe a rotary encoder? If so, does anyone have the answer for how I can do this please? The application is a variable psu current and voltage control so I need two outputs at different voltages both with a user variable duty cycle 0 to 100%. I would like for now just to find some code or what ever it is I need as my main aim at present is to finish my psu design. As always, many thanks for reading my post :)
 

MaxHeadRoom

Joined Jul 18, 2013
28,702
You don't mention what you intend programming in, C? Assembler?
Apart from the Pic manual itself, there is many app notes and examples of using PWM look for the CCP module and associated registers.
Max.
 
Top