Hello again;
I have to control a DC motor 9V using "PWM" Using the AVR Butterfly which use Atmel (Atmega 169).
I need to write a C code to control it using Timer1 and Fast PWM.
My Question for now is the clock frequency for atmegag169 ??
I want to set a prescaling but I'm not sure about the clock frequency ??
also the Top value ???
what is the different between ICR1 and OCR1B???
actually I have so many question about PWM and how to code it . I searched through the NET but found what I already Know.
If you Know a book taking about it can you please help .
The input is from PORTB using a switch, from 0 - 4 ,each define a duty cycle and frequency .
My problem is the Clock frequency which I have to know to set the prescaling value and the Top Value. ??
Help please !
I have to control a DC motor 9V using "PWM" Using the AVR Butterfly which use Atmel (Atmega 169).
I need to write a C code to control it using Timer1 and Fast PWM.
My Question for now is the clock frequency for atmegag169 ??
I want to set a prescaling but I'm not sure about the clock frequency ??
also the Top value ???
what is the different between ICR1 and OCR1B???
actually I have so many question about PWM and how to code it . I searched through the NET but found what I already Know.
If you Know a book taking about it can you please help .
The input is from PORTB using a switch, from 0 - 4 ,each define a duty cycle and frequency .
My problem is the Clock frequency which I have to know to set the prescaling value and the Top Value. ??
Help please !