<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6264947694886887540.post5409564808315467886..comments</id><updated>2012-02-06T22:02:04.383-08:00</updated><category term='c#'/><category term='arduino'/><category term='snark'/><category term='spanish'/><category term='math'/><category term='theory'/><category term='photo'/><category term='f#'/><category term='css'/><category term='anarki'/><category term='javascript'/><category term='documentation'/><category term='java'/><category term='html5'/><category term='haskell'/><category term='arc'/><category term='random'/><category term='fractals'/><category term='sheevaplug'/><category term='ir'/><category term='genome'/><category term='ipv6'/><title type='text'>Comments on Ken Shirriff's blog: Secrets of Arduino PWM</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.arcfn.com/feeds/5409564808315467886/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html'/><author><name>Ken Shirriff</name><uri>http://www.blogger.com/profile/08097301407311055124</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-5608487134960863004</id><published>2012-02-06T22:02:04.383-08:00</published><updated>2012-02-06T22:02:04.383-08:00</updated><title type='text'>I want to use a low frequency PWM, below 10Hz. The...</title><content type='html'>I want to use a low frequency PWM, below 10Hz. The frequency isn&amp;#39;t critical but would have to be in that area. Any ideas how to get down to that frequency? I want to use the Arduino Uno for other things whilst the PWM is being output.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/5608487134960863004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/5608487134960863004'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1328594524383#c5608487134960863004' title=''/><author><name>Henry Best</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1781982859'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-7581832958560681375</id><published>2012-02-03T21:32:04.395-08:00</published><updated>2012-02-03T21:32:04.395-08:00</updated><title type='text'>The version of this article posted at &lt;a href="htt...</title><content type='html'>The version of this article posted at &lt;a href="http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM" rel="nofollow"&gt;arduino.cc&lt;/a&gt; is missing all of the diagrams except the first one.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/7581832958560681375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/7581832958560681375'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1328333524395#c7581832958560681375' title=''/><author><name>mitch deoudes</name><uri>http://www.houseofpain.org</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-933766646'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-825525498605018816</id><published>2012-01-19T01:21:23.049-08:00</published><updated>2012-01-19T01:21:23.049-08:00</updated><title type='text'>Thank you very much, this is the best condensed re...</title><content type='html'>Thank you very much, this is the best condensed reference I have seen, all clear and to the point!!!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/825525498605018816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/825525498605018816'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1326964883049#c825525498605018816' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1392701026'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-8134674511736544012</id><published>2011-08-15T00:47:10.254-07:00</published><updated>2011-08-15T00:47:10.254-07:00</updated><title type='text'>_BV is a macro defined in avr-libc:

#define _BV(x...</title><content type='html'>_BV is a macro defined in avr-libc:&lt;br /&gt;&lt;br /&gt;#define _BV(x)   (1 &amp;lt;&amp;lt; x)&lt;br /&gt;&lt;br /&gt;see http://194.81.104.27/~brian/microprocessor/BVMacro.pdf</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/8134674511736544012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/8134674511736544012'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1313394430254#c8134674511736544012' title=''/><author><name>coopermaa</name><uri>http://www.blogger.com/profile/14597993167511073460</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2100528931'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-8888101986429879071</id><published>2011-08-14T23:58:42.122-07:00</published><updated>2011-08-14T23:58:42.122-07:00</updated><title type='text'>This may be a stupid question by a newbie, but wha...</title><content type='html'>This may be a stupid question by a newbie, but what is the _BV function?  Nowhere to be found in the Arduino reference.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/8888101986429879071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/8888101986429879071'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1313391522122#c8888101986429879071' title=''/><author><name>Michael</name><uri>http://www.blogger.com/profile/05858975075878302747</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1407757001'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-833855992645591806</id><published>2011-07-24T14:05:09.521-07:00</published><updated>2011-07-24T14:05:09.521-07:00</updated><title type='text'>Great summary and guide for using the ATmega328p t...</title><content type='html'>Great summary and guide for using the ATmega328p timers!  Thanks for taking the time to put this together.  Very helpful.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/833855992645591806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/833855992645591806'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1311541509521#c833855992645591806' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-490042942'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-97908890212131299</id><published>2011-06-27T08:21:18.401-07:00</published><updated>2011-06-27T08:21:18.401-07:00</updated><title type='text'>I wrote a brief article on creating PWM using the ...</title><content type='html'>I wrote a brief article on creating PWM using the Arduino UNO, with ability to control the frequency on my blog. Just leaving a link here as I found this article very useful in my research !&lt;br /&gt;&lt;br /&gt;http://smacula.blogspot.com/2011/04/creating-variable-frequency-pwm-output.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/97908890212131299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/97908890212131299'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1309188078401#c97908890212131299' title=''/><author><name>Sami Mughal</name><uri>http://www.blogger.com/profile/11742364931896059935</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://4.bp.blogspot.com/_nDn64oGyifI/S-5k7b--SgI/AAAAAAAACIY/QuAmKBQ2PDM/S220/140820b.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-122516840'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-54981265695428223</id><published>2011-05-15T02:56:56.673-07:00</published><updated>2011-05-15T02:56:56.673-07:00</updated><title type='text'>Very helpful, thanks for your share.

As for debug...</title><content type='html'>Very helpful, thanks for your share.&lt;br /&gt;&lt;br /&gt;As for debugging PWM, I think proteus ISIS is a good tool for that purpose. Proteus has a virtual osilloscope, see my post(in chinese, sorry):&lt;br /&gt;http://coopermaa2nd.blogspot.com/2011/05/proteus-pwm.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/54981265695428223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/54981265695428223'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1305453416673#c54981265695428223' title=''/><author><name>coopermaa</name><uri>http://www.blogger.com/profile/14597993167511073460</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2100528931'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-6783103267359376189</id><published>2011-05-01T00:37:39.330-07:00</published><updated>2011-05-01T00:37:39.330-07:00</updated><title type='text'>Very informative! Excellent Work! Thanks!</title><content type='html'>Very informative! Excellent Work! Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6783103267359376189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6783103267359376189'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1304235459330#c6783103267359376189' title=''/><author><name>Quarkninja</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-802995578'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-4186506149259778314</id><published>2011-03-08T14:14:09.448-08:00</published><updated>2011-03-08T14:14:09.448-08:00</updated><title type='text'>but how can i get it to make a 38khz freq with 50%...</title><content type='html'>but how can i get it to make a 38khz freq with 50% duty cicle?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/4186506149259778314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/4186506149259778314'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1299622449448#c4186506149259778314' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2119182253'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-2692242728647297320</id><published>2011-02-13T11:47:56.152-08:00</published><updated>2011-02-13T11:47:56.152-08:00</updated><title type='text'>Thanks for explaining this matter so extensively! ...</title><content type='html'>Thanks for explaining this matter so extensively! I was looking for a way to generate 1 MHz on one of the Arduino-pins. Your post helped me a great deal to accomplish that. &lt;br /&gt;&lt;br /&gt;The reason I am writing this comment is the following: It took me almost 6 hours till I found out (mainly in sheer desperation) that the order of setting the timer control registers TCCR2* and the output compare registers OCR2* seems to matter! If you assign an OCR before setting the corresponding TCCR the timer simply doesn&amp;#39;t start counting.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/2692242728647297320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/2692242728647297320'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1297626476152#c2692242728647297320' title=''/><author><name>Thorsten</name><uri>http://www.blogger.com/profile/10631873262839085568</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1126379977'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-3981609119757961662</id><published>2010-12-17T22:27:53.023-08:00</published><updated>2010-12-17T22:27:53.023-08:00</updated><title type='text'>Colin, thanks for your comment.  I&amp;#39;m glad the ...</title><content type='html'>Colin, thanks for your comment.  I&amp;#39;m glad the article was helpful.&lt;br /&gt;&lt;br /&gt;Cassiano, with a sound card oscilloscope, you connect the signal directly to the sound card through a resistor to reduce the current.  There are details at http://www.ehow.com/how_2278973_use-sound-card-oscilloscope.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/3981609119757961662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/3981609119757961662'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1292653673023#c3981609119757961662' title=''/><author><name>Ken Shirriff</name><uri>http://www.blogger.com/profile/08097301407311055124</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-950883581'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-6535255387428565246</id><published>2010-12-16T23:44:54.063-08:00</published><updated>2010-12-16T23:44:54.063-08:00</updated><title type='text'>Most excellent thank you -- saved me days trying t...</title><content type='html'>Most excellent thank you -- saved me days trying to make sense of that Atmega328 datasheet&lt;br /&gt;I was using the default 490 Mhz arduino analogWrite PWM and was getting horribly low torque with some small DC motors on low duty cycles.  Changed it to 30Hz and now its way better, still runs smooth.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6535255387428565246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6535255387428565246'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1292571894063#c6535255387428565246' title=''/><author><name>Colin Adamson</name><uri>http://www.xaxxon.com</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-703272939'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-689804252439570451</id><published>2010-09-23T17:55:51.717-07:00</published><updated>2010-09-23T17:55:51.717-07:00</updated><title type='text'>Excellent tutorial Ken. Thanks a lot for sharing y...</title><content type='html'>Excellent tutorial Ken. Thanks a lot for sharing your knowledge.&lt;br /&gt;&lt;br /&gt;Would you mind elaborating a bit more on how someone could use the sound card and a program such as xoscope to help debug this sort of thing? Do you mean by plugin a speaker to the arduino pin, getting it close to the computer mic and using such a software to graph the wave?&lt;br /&gt;&lt;br /&gt;Thanks once again.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/689804252439570451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/689804252439570451'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1285289751717#c689804252439570451' title=''/><author><name>Cassiano Rabelo</name><uri>http://www.blogger.com/profile/17968034719797455466</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://1.bp.blogspot.com/_-Q5_FBnf4XU/SSqZNEr4nxI/AAAAAAAAAAM/dzDuXToopd8/S220/DSC01017cropped.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1156512535'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-4140266131425292634</id><published>2010-05-23T01:32:42.218-07:00</published><updated>2010-05-23T01:32:42.218-07:00</updated><title type='text'>that is wonderful.. but whan i was looking at the ...</title><content type='html'>that is wonderful.. but whan i was looking at the library i saw in the comments that this will work only for 36-40khz modulation? Whay is that and how can i change it so it will work on 56khz?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/4140266131425292634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/4140266131425292634'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1274603562218#c4140266131425292634' title=''/><author><name>Matej</name><uri>http://www.blogger.com/profile/15133175322951099195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-579395926'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-3187764426059483792</id><published>2010-05-22T18:06:03.674-07:00</published><updated>2010-05-22T18:06:03.674-07:00</updated><title type='text'>Very helpful, thanks--we&amp;#39;re trying to use Ardu...</title><content type='html'>Very helpful, thanks--we&amp;#39;re trying to use Arduinos to power a small pump and measure flow for an open source river modeling system, and I was hung on this topic until reading this--see our stuff at lrrd.blogspot.com.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/3187764426059483792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/3187764426059483792'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1274576763674#c3187764426059483792' title=''/><author><name>Steve Gough</name><uri>http://www.blogger.com/profile/16066285550739882631</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://emriver.com/xfiles/steve_and_kate_by_kate_small.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-746414295'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-6033633940766427347</id><published>2010-04-21T09:15:45.382-07:00</published><updated>2010-04-21T09:15:45.382-07:00</updated><title type='text'>Ken,

I am just learning about Arduino and I have ...</title><content type='html'>Ken,&lt;br /&gt;&lt;br /&gt;I am just learning about Arduino and I have a question about your article on “Secrets of Arduino PWM”.&lt;br /&gt;&lt;br /&gt;Your example says &lt;br /&gt;  pinMode(3, OUTPUT);&lt;br /&gt;  pinMode(11, OUTPUT);&lt;br /&gt;  TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM20);&lt;br /&gt;  TCCR2B = _BV(CS22);&lt;br /&gt;  OCR2A = 180;&lt;br /&gt;  OCR2B = 50;&lt;br /&gt;What I am confused about is previously you stated that that these examples set the clock divisor to 64. Is there a bit inversion in the writes to an AVR register? &lt;br /&gt;Your line TCCR2B = _BV(CS22); would set the TCCR2B register to 00000100b.&lt;br /&gt;&lt;br /&gt;Is there something I’m missing here?&lt;br /&gt;&lt;br /&gt;Thanks in advance for your response.&lt;br /&gt;&lt;br /&gt;Monty</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6033633940766427347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6033633940766427347'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1271866545382#c6033633940766427347' title=''/><author><name>monty</name><uri>http://www.blogger.com/profile/17184388661015389939</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1500775137'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-7465220869248547949</id><published>2010-03-16T23:22:38.430-07:00</published><updated>2010-03-16T23:22:38.430-07:00</updated><title type='text'>Tom, you asked about how to divide by 64 with the ...</title><content type='html'>Tom, you asked about how to divide by 64 with the prescaler.  For timer0 and timer1, the clock select bits are set to 011 (CS02,CS01,CS00 or CS12,CS11,CS10).  But for timer2, the clock select bits are set to 100 (CS20,CS21,CS20).  Confusingly, Timer 2 uses different clock select bit values from Timers 0 and 1.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/7465220869248547949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/7465220869248547949'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1268806958430#c7465220869248547949' title=''/><author><name>Ken Shirriff</name><uri>http://www.blogger.com/profile/08097301407311055124</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-950883581'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-6379427141641594515</id><published>2010-02-27T09:42:48.913-08:00</published><updated>2010-02-27T09:42:48.913-08:00</updated><title type='text'>Excellent article, I&amp;#39;ve been going through som...</title><content type='html'>Excellent article, I&amp;#39;ve been going through some example code but this made it all come together.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Mike</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6379427141641594515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6379427141641594515'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1267292568913#c6379427141641594515' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2002663465'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-6378661885610687434</id><published>2010-02-07T09:56:20.022-08:00</published><updated>2010-02-07T09:56:20.022-08:00</updated><title type='text'>I am so glad I found this.  Just what I needed.  
...</title><content type='html'>I am so glad I found this.  Just what I needed.  &lt;br /&gt;One question though-likely I am not understanding some subtlety. &lt;br /&gt;It seems from the datasheet that the 64 pre-scale corresponds to 110. I am wondering if I am missing something, as you mention 100 as the 64 prescale divider.&lt;br /&gt;Thank you!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6378661885610687434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6378661885610687434'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1265565380022#c6378661885610687434' title=''/><author><name>Tom</name><uri>http://www.blogger.com/profile/13087413453907453645</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_o_7kkkS0-3g/StHoy6ZSWCI/AAAAAAAAAC8/GSML-0c2JDs/S220/PC120467.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2059735590'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-7495656219882598511</id><published>2010-01-23T13:38:15.751-08:00</published><updated>2010-01-23T13:38:15.751-08:00</updated><title type='text'>exactly what I needed!  thanks!</title><content type='html'>exactly what I needed!  thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/7495656219882598511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/7495656219882598511'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1264282695751#c7495656219882598511' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/05954077676960722034</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-126362381'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-6069690033327361117</id><published>2010-01-10T05:57:13.332-08:00</published><updated>2010-01-10T05:57:13.332-08:00</updated><title type='text'>Excellent paper. Many Thanks</title><content type='html'>Excellent paper. Many Thanks</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6069690033327361117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/6069690033327361117'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1263131833332#c6069690033327361117' title=''/><author><name>Didier</name><uri>http://www.blogger.com/profile/17060121093734820965</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1622734700'/></entry><entry><id>tag:blogger.com,1999:blog-6264947694886887540.post-57531341931304128</id><published>2009-11-01T10:46:19.917-08:00</published><updated>2009-11-01T10:46:19.917-08:00</updated><title type='text'>Thank you for the article!

As a beginning Arduino...</title><content type='html'>Thank you for the article!&lt;br /&gt;&lt;br /&gt;As a beginning Arduino user, this is very helpful!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/57531341931304128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6264947694886887540/5409564808315467886/comments/default/57531341931304128'/><link rel='alternate' type='text/html' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html?showComment=1257101179917#c57531341931304128' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.arcfn.com/2009/07/secrets-of-arduino-pwm.html' ref='tag:blogger.com,1999:blog-6264947694886887540.post-5409564808315467886' source='http://www.blogger.com/feeds/6264947694886887540/posts/default/5409564808315467886' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-988381873'/></entry></feed>
