Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

relation between frequency and pwm in atmega16

Status
Not open for further replies.

southpaw4471092

Junior Member level 1
Junior Member level 1
Joined
Apr 6, 2012
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,392
Hi,
i wanted to implement dc motor speed control using atmega16 with clock internal 8mhz.
But im unable to do soand i guess i'm not using the proper prescaler.Please help me out with this.

Code C - [expand]
1
2
3
4
void timer0_init()
{
    TCCR0|=(1<<WGM00)|(1<<WGM01)|(1<<COM00)|(1<<COM01)|(1<<CS00)|(1<<CS02);
}


When i give a value to OCR0 in main function, im not able to get the desired result.Please help to know how i can choose a prescaler to get a correct result.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top