Continue to Site

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.

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

Choosing Period and Duty Cycle (PWM)

Status
Not open for further replies.
Hello everybody.
I would like to ask about the period and duty cycle quantities when generating a PWM signal.

1) First I am using a PIC18F2550 so I suppose that my Fosc = 1MHz. (I read this on the data sheet, is there a way to check this??)

2) Now I have to set the PWM period or frequency (the inverse).
How do I set this? What quantities are recommended for PWM period?
(i am planning to use this to control a motor, but in the meantime I am also trying to control a LED brightness too)

I heard there are some recommendations for choosing a period so that the motor does not generate a human audible sound?

I would really much appreciate your thoughts on this, I have read already PLENTY of pages on PWM and I know the concept but the points above are still unclear

Thanks in advance

kansai
 
Hi,

1) The oscillation frequency is depending on how you configure the PIC.
2) For the PWM duty cycle and frequency/period, you can also set it. Read the datasheet of the PIC for how to do it.
A hint for you, at 50 or 60 Hz alternating current, you won't see the light bulb flickering will you?
 
thanks for the reply :)

I know of course that I can configure both the osc freq and the PWM period. I have read the datasheet and understand pretty much how to set it.

My question is more of the type:

1) what is the default Tosc?

2) What quantities are recommended for PWM period?

I am thinking on trying at random but I dont want to burn anything....
 
Status
Not open for further replies.

Latest threads

Back
Top