C code to Generate PWM signal

Status
Not open for further replies.

dazed2

New Member
Hi

I am using PICFJ128GA010 microcontroller

I need to generate PWM signal by comparing error signal with the sawtooth signal

PWM frequency : 50 khz to 100kHZ
Sawtooth amp : 0.5V to 3V

Error signal I am receiving externally, which will be converted to digital using ADC. then cpmared with sawtooth to generate PWM

Can someone help me to write c code to generation of sawtooth and comparison.
I have written code for error signal conversion . SAmpling rate of this is 10khz.

Now how do i proceed ?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…