<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Interrupt Tutorial II - Arduino Timer Interrupt	</title>
	<atom:link href="https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/</link>
	<description>Microcontroller Tutorials and Resources</description>
	<lastBuildDate>Thu, 09 Jan 2025 23:56:17 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>
	<item>
		<title>
		By: Roland Pelayo		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-169538</link>

		<dc:creator><![CDATA[Roland Pelayo]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 21:20:05 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-169538</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-167443&quot;&gt;louie&lt;/a&gt;.

Hi louie,

It&#039;s an XOR operator and used here the same as digitalWrite(13,!digitalRead(13)). Basically, it&#039;s complementing/negating whatever the actual value read by digitalRead(13), since 0 xor 1 = 1 and 1 xor 1 = 0]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-167443">louie</a>.</p>
<p>Hi louie,</p>
<p>It's an XOR operator and used here the same as digitalWrite(13,!digitalRead(13)). Basically, it's complementing/negating whatever the actual value read by digitalRead(13), since 0 xor 1 = 1 and 1 xor 1 = 0</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: louie		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-167443</link>

		<dc:creator><![CDATA[louie]]></dc:creator>
		<pubDate>Thu, 08 Jul 2021 00:48:07 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-167443</guid>

					<description><![CDATA[digitalWrite( 13, digitalRead( 13 ) ^ 1 );  What is thos saying? with the ^  ???]]></description>
			<content:encoded><![CDATA[<p>digitalWrite( 13, digitalRead( 13 ) ^ 1 );  What is thos saying? with the ^  ???</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Garry		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-94149</link>

		<dc:creator><![CDATA[Garry]]></dc:creator>
		<pubDate>Fri, 30 Oct 2020 01:47:02 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-94149</guid>

					<description><![CDATA[Awesome Tutorial.  Appears the webpage ahs a virus.  I get a warning using Norton AV!  Please scan and fix.]]></description>
			<content:encoded><![CDATA[<p>Awesome Tutorial.  Appears the webpage ahs a virus.  I get a warning using Norton AV!  Please scan and fix.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nikolay		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-65232</link>

		<dc:creator><![CDATA[Nikolay]]></dc:creator>
		<pubDate>Tue, 03 Mar 2020 19:52:11 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-65232</guid>

					<description><![CDATA[Hello! Can I disable overflow interrupt (TIMSK2 = 0), setup Timer2 with prescaler = 1024, and then just wait for Timer2 overflow flag:

void loop() {
  while (bitRead(TIFR2, TOV2) == 0) {}
  bitClear(TIFR2, TOV2);
  TCNT2 = timerConstant;

  // do some things
}]]></description>
			<content:encoded><![CDATA[<p>Hello! Can I disable overflow interrupt (TIMSK2 = 0), setup Timer2 with prescaler = 1024, and then just wait for Timer2 overflow flag:</p>
<p>void loop() {<br />
  while (bitRead(TIFR2, TOV2) == 0) {}<br />
  bitClear(TIFR2, TOV2);<br />
  TCNT2 = timerConstant;</p>
<p>  // do some things<br />
}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Karthikeyan		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-23690</link>

		<dc:creator><![CDATA[Karthikeyan]]></dc:creator>
		<pubDate>Sat, 06 Jul 2019 03:50:19 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-23690</guid>

					<description><![CDATA[&quot;Timers make PWM generation possible.&quot;
When will you upload the tutorial?]]></description>
			<content:encoded><![CDATA[<p>"Timers make PWM generation possible."<br />
When will you upload the tutorial?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Roland Pelayo		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-22690</link>

		<dc:creator><![CDATA[Roland Pelayo]]></dc:creator>
		<pubDate>Tue, 04 Jun 2019 22:23:18 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-22690</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-22439&quot;&gt;mehendisbey&lt;/a&gt;.

For the first equation, it would be whatever bits 1 to 7 of TIMSK2 is and bit 0 would be 1.

 Example: let’s say TIMSK2 = B10111010. Then TIMSK2 &amp; B11111110 = B10111010. Then B10111010 &#124; 0x01 = B10111011.

 For the second equation, let TCCR2B = B11010000. Then TCCR2B &amp; B11111000 = B11010000. Then B11010000 &#124; 0x07 = B11010000 &#124; B00000111 = B11010111.

BTW, using &amp; and &#124; like this is called masking since it essentially masks the other bits that we don’t need to change.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-22439">mehendisbey</a>.</p>
<p>For the first equation, it would be whatever bits 1 to 7 of TIMSK2 is and bit 0 would be 1.</p>
<p> Example: let’s say TIMSK2 = B10111010. Then TIMSK2 &#038; B11111110 = B10111010. Then B10111010 | 0x01 = B10111011.</p>
<p> For the second equation, let TCCR2B = B11010000. Then TCCR2B &#038; B11111000 = B11010000. Then B11010000 | 0x07 = B11010000 | B00000111 = B11010111.</p>
<p>BTW, using &#038; and | like this is called masking since it essentially masks the other bits that we don’t need to change.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: wannachat surasiang		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-22521</link>

		<dc:creator><![CDATA[wannachat surasiang]]></dc:creator>
		<pubDate>Tue, 28 May 2019 15:17:28 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-22521</guid>

					<description><![CDATA[It is a very useful article and I would like to translate this article into Thai on my blog. And I will refer to you]]></description>
			<content:encoded><![CDATA[<p>It is a very useful article and I would like to translate this article into Thai on my blog. And I will refer to you</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mehendisbey		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-22439</link>

		<dc:creator><![CDATA[mehendisbey]]></dc:creator>
		<pubDate>Sat, 25 May 2019 21:13:57 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-22439</guid>

					<description><![CDATA[TIMSK2 = (TIMSK2 &#038; B11111110) &#124; 0x01;
   TCCR2B = (TCCR2B &#038; B11111000) &#124; 0x07;

can you explain what is the result of these to equations.I mean what will be the values of TIMSK2 abd TCCR2B?Thanks.]]></description>
			<content:encoded><![CDATA[<p>TIMSK2 = (TIMSK2 &amp; B11111110) | 0x01;<br />
   TCCR2B = (TCCR2B &amp; B11111000) | 0x07;</p>
<p>can you explain what is the result of these to equations.I mean what will be the values of TIMSK2 abd TCCR2B?Thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Roland Pelayo		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-22008</link>

		<dc:creator><![CDATA[Roland Pelayo]]></dc:creator>
		<pubDate>Wed, 15 May 2019 04:00:59 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-22008</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-21458&quot;&gt;STA&lt;/a&gt;.

I agree, but coming from PICs instead of ATMEL, I am less familiar with this syntax. I will try to implement that soon.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-21458">STA</a>.</p>
<p>I agree, but coming from PICs instead of ATMEL, I am less familiar with this syntax. I will try to implement that soon.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: STA		</title>
		<link>https://www.teachmemicro.com/arduino-timer-interrupt-tutorial/#comment-21458</link>

		<dc:creator><![CDATA[STA]]></dc:creator>
		<pubDate>Sun, 28 Apr 2019 16:39:06 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2582#comment-21458</guid>

					<description><![CDATA[It will be much clearer to a beginner if you would use this style:

   TIMSK2 = (1 &#060;&#060; OC1EA &#124; 1 &#060;&#060; OC1EB);
   TCCR2B = (1 &#060;&#060; CS22 &#124; 1 &#060;&#060; CS21 &#124; 1 &#060;&#060; CS20) ;]]></description>
			<content:encoded><![CDATA[<p>It will be much clearer to a beginner if you would use this style:</p>
<p>   TIMSK2 = (1 &lt;&lt; OC1EA | 1 &lt;&lt; OC1EB);<br />
   TCCR2B = (1 &lt;&lt; CS22 | 1 &lt;&lt; CS21 | 1 &lt;&lt; CS20) ;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: www.teachmemicro.com @ 2026-11-27 08:01:58 by W3 Total Cache
-->