Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

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.
 

Tahmid

Advanced Member level 5
Joined
Jun 17, 2008
Messages
4,758
Helped
1,791
Reputation
3,574
Reaction score
1,650
Trophy points
1,393
Location
Silicon Valley, California, USA (from Dhaka, Bangl
Activity points
30,545
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
 

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top