Page 1 of 1

pwm with PICs

Posted: Tue Dec 09, 2008 5:55 pm
by Bonanza
I'm having a great time with the PIC tutorial - it is very well written and easy to understand. There is one specific application that is not covered however, and it is one that I really need to understand - how to use the pwm modules on the PIC. I am going to be programming a 16F616 and use its A/D to monitor 4 temps. The pwm output will be controlling the voltage applied to reach the temps. I am actually going to be using only one output rather than four, and I will be adjusting the pwm voltage output according to the range of readings I receive through the A/Ds. My question is - how do you use the pwm feature on the PIC? Do you have any code examples of a similiar application? I am programming in assembly. Thanks for any help!

Re: pwm with PICs

Posted: Fri Dec 12, 2008 2:50 pm
by Bonanza
Can anybody help?

Re: pwm with PICs

Posted: Fri Dec 12, 2008 3:42 pm
by Benj
Hello Bonanza

I have attached an example for the 16F616 that takes a sample from ADC channel 0 and outputs the value as a PWM mark/space value on PWM pin CCP1. Hopefully it should be just what you require.

Re: pwm with PICs

Posted: Mon Dec 15, 2008 4:20 pm
by Bonanza
Yeeehawww!!!! A big thank you from Texas USA!!! I am just now seeing this and won't have time to try it until later today, but I'll let you know how it goes. Thanks again for going the extra mile!!!