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.
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.
I'm looking to vary the duty cycle of a PWM signal with a reference of 0-10V.
Is there any way of doing this using a dspic33?
Thanks for your help. Any ideas will be greatly appreciated.
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!
Take a look at the Microchip 16 bit **broken link removed** for something to look at. I find the Microchip code is not always readable, but hey, you might get lucky.
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.