Joined: 18 Nov 2007 Posts: 37 Location: New Jersey, USA
Posted: Mon Aug 05, 2013 1:06 pm Post subject: How to increse frequency of PWM
I am designing a Maximum Power Point circuit for a solar panel
and having a problem trying to increase the frequency of the PWM
signal. I am using the ATmega88 and Bascom-AVR ver 2.0.7.6 and
a 7.372800MHz crystal.
When using the following config the freq is 14.5KHz for COMPARE1A
75 to 150
Config Timer1=PWM,PWM=8,Compare_A_PWM=Clear_Up ,Prescale = 1
Visovian is right. It would be good to study the ATmega88 datasheet to understand how PWM works.
Do you need PWM or is generating a square wave or different frequencies(constant 50% duty cycle) going to work?
Or to put it another way what is the signal that you need to generate? How much resolution do you need? What is the most narrow and widest pulse width that you need to generate?
To generate a 200kHz signal with 8 bit resolution you would need a clock of 51.2MHz!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum