- This topic has 3 replies, 4 voices, and was last updated 11 years, 2 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › atmega 8 to produce pwm
how to program atmega 8 to generate pwm with a frequency 100khz by subtracting ramp and Vref and compare them to drive mosfet of dc-dc converter , where Vref is input for the atmega and the ramp is internally generated
Hi, mahmoud
In Atmega8 you can get PWM output by programming TimerX (0,1,2) in Fast PWM mode, phase correct PWM mode and Phase and freq. corrrect mode. In ATmega8 datasheet sample code is given on TimerX. On Youtube seacrh humanHardDrive for video tutorial.
in ATmega controllers generating PWM using fast PWM method is easy. for setting frequency you have to divide clock frequency by desire factor. during this time period the ramp increases from min (0) to max (256).
Hi Mahmoud,
Please find this link