How to use the variable frequency generator of ATMega16 controller?

Status
Not open for further replies.

ashishkoujalgi

Newbie level 2
Joined
Dec 6, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
Hello all,

I am new to this forum and i wanted to know how i can generate variable frequency using the ATMega16 microcontroller. I want to generate PWM signal whose frequency can be varied from 2Hz to 2.5kHz using the push buttons.
 

How many steps are you going to use?

Will you have just 50% duty cycle or will you vary duty cycle as well?

Have you gone through the datasheet and taken a look at the CMO module and the PWM modes of operation? If not, here's the datasheet: www.atmel.com/Images/doc2466.pdf
 



Hello Tahmid,

Thanks for your reply. I have read the PWM Modes in the datasheets few times and i am not able to exactly figure out what i need to do.
I need to vary the frequency in steps of 1Hz (2Hz to 2.5kHz) and duty cycle from 1-100%. I want to control both the parameters taking the input from the user.
I am using ATMega16 with 16MHz crystal.

Regards,
Ashish
 

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