Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Thanks for your help.
Do you have any kind of sample code that I could use as a template?.This is for a dspic33f,I'm looking at the PWM sections of the datasheet and I'm completely confused as to set the pwm registers!
Try reading the section of the PDF for your chip that describe the PWM hardware.. It's all in there. No one in the forums minds helping, but asking questions that are fully described in datasheets that you have available to you is not something most people like to do =)
I've already read the data sheet many times and PDCx duty cycle registers sets the dutycycle for the pwm. I got a pwm signal out of the system but My problem is not the duty cycle but the pwm time period or(freq) that I need to tune.I started changing the values on the PTCON or pwm time base register but the output still is not the desired value that I need. I'm not sure if I'm missing anything here, can someone help?
You may not be able to get the 'desired value' you want, the frequencies hardware PWM can put out at a given bit depth for the duty cycle are limited. What exactly are you trying to set the frequency to?