BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Thu Apr 26, 2018 12:30 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Generating PWM
PostPosted: Thu Sep 19, 2013 12:31 pm 
Offline
New User

Joined: Thu Sep 19, 2013 12:24 pm
Posts: 3
Hi...
I am using an Arduino board. In this borad Atmega 328 microcontroller is used.
I want to generate a PWM signal but I don't know much about thi coz I am new to this.
If possible then please tell me a simple 'C' code for generating PWM for a DC-DC converter where switching frequency is 60KHz.


Top
 Profile  
 
 Post subject: Re: Generating PWM
PostPosted: Thu Sep 19, 2013 4:45 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
There are functions built in to the Arduino for doing some PWM work. Try looking at the AnalogWrite command:
http://arduino.cc/en/Reference/AnalogWrite


Top
 Profile  
 
 Post subject: Re: Generating PWM
PostPosted: Thu Sep 19, 2013 5:16 pm 
Offline
New User

Joined: Thu Sep 19, 2013 12:24 pm
Posts: 3
That function is only work for 500hz switching frequency.


Top
 Profile  
 
 Post subject: Re: Generating PWM
PostPosted: Sat Sep 21, 2013 6:28 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Probably by now you have already found your answers. There is lots up on the web about setting frequency and the like, that you can find by Goggle or Bing...

Example: http://playground.arduino.cc/Code/PwmFrequency
or:
http://forum.arduino.cc/index.php?topic=117425.0


Top
 Profile  
 
 Post subject: Re: Generating PWM
PostPosted: Sun Sep 22, 2013 5:24 am 
Offline
New User

Joined: Thu Sep 19, 2013 12:24 pm
Posts: 3
Thank you :)

One more help I need.
How to generate a sine pwm signal for a 3 phase inverter?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO