• 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.

Pwm

Status
Not open for further replies.

Angy

New Member
Hello all,

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.
 

Angy

New Member
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!
 

Angy

New Member
Yes, I need to do this using dspic, that is the project definition.Any help will be greatly appreciated.
 

Sceadwian

Banned
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 =)
 
Last edited:

atferrari

Well-Known Member
General questions

Believe it or not, the best start is always the datasheet.

Questions with such an ample scope should be solved (or tried to) reading the datasheet and then coming here with more specific questions.

You must do the inital effort.
 

Angy

New Member
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?
 

Sceadwian

Banned
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?
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top