<?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: Arduino Interrupt Tutorial	</title>
	<atom:link href="https://www.teachmemicro.com/arduino-interrupt-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.teachmemicro.com/arduino-interrupt-tutorial/</link>
	<description>Microcontroller Tutorials and Resources</description>
	<lastBuildDate>Thu, 22 Oct 2026 00:55:46 +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-interrupt-tutorial/#comment-19104</link>

		<dc:creator><![CDATA[Roland Pelayo]]></dc:creator>
		<pubDate>Sat, 02 Mar 2019 23:20:13 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2566#comment-19104</guid>

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

Hi,

Good question! Looking at the datasheet, there&#039;s no register for specifying the trigger type (CHANGE, LOW, HIGH, RISING, FALLING) when using Pin Change Interrupt, unlike in the external interrupts (which has EICRA). This is logical since it&#039;s called pin change interrupt so it must only trigger on CHANGE. But if you noticed, in the PinChangeInt library I presented, there seems to be an option to specify the trigger event:

&lt;pre&gt;PCintPort::attachInterrupt(A0, isr, CHANGE);&lt;/pre&gt;

Looking at the library, I saw this:

&lt;pre&gt;
PCintPin* p = firstPin;
		while (p) {
		// Trigger interrupt if the bit is high and it&#039;s set to trigger on mode RISING or CHANGE
		// Trigger interrupt if the bit is low and it&#039;s set to trigger on mode FALLING or CHANGE
			if (p-&gt;mask &amp; changedPins) {
				#ifndef NO_PIN_STATE
				PCintPort::pinState=PCintPort::curr &amp; p-&gt;mask ? HIGH : LOW;
				#endif
				#ifndef NO_PIN_NUMBER
				PCintPort::arduinoPin=p-&gt;arduinoPin;
				#endif
				#ifdef PINMODE
				PCintPort::pinmode=p-&gt;mode;
				PCintPort::s_portRisingPins=portRisingPins;
				PCintPort::s_portFallingPins=portFallingPins;
				PCintPort::s_pmask=p-&gt;mask;
				PCintPort::s_changedPins=changedPins;
				#endif
				p-&gt;PCintFunc();
			}
			p=p-&gt;next;
}
&lt;/pre&gt;

According to this, while there&#039;s nothing on the datasheet that says you can&#039;t specify the trigger event on pin change interrupt, it seems the library still allows you to do that depending on the initial state of your interrupt pin. So rising edge triggering is possible if the interrupt pin is initially low then made high or falling edge triggering is possible if the interrupt pin is initially high then made low.

I hoped this answered your question.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-19093">Akram</a>.</p>
<p>Hi,</p>
<p>Good question! Looking at the datasheet, there's no register for specifying the trigger type (CHANGE, LOW, HIGH, RISING, FALLING) when using Pin Change Interrupt, unlike in the external interrupts (which has EICRA). This is logical since it's called pin change interrupt so it must only trigger on CHANGE. But if you noticed, in the PinChangeInt library I presented, there seems to be an option to specify the trigger event:</p>
<pre>PCintPort::attachInterrupt(A0, isr, CHANGE);</pre>
<p>Looking at the library, I saw this:</p>
<pre>
PCintPin* p = firstPin;
		while (p) {
		// Trigger interrupt if the bit is high and it's set to trigger on mode RISING or CHANGE
		// Trigger interrupt if the bit is low and it's set to trigger on mode FALLING or CHANGE
			if (p->mask &#038; changedPins) {
				#ifndef NO_PIN_STATE
				PCintPort::pinState=PCintPort::curr &#038; p->mask ? HIGH : LOW;
				#endif
				#ifndef NO_PIN_NUMBER
				PCintPort::arduinoPin=p->arduinoPin;
				#endif
				#ifdef PINMODE
				PCintPort::pinmode=p->mode;
				PCintPort::s_portRisingPins=portRisingPins;
				PCintPort::s_portFallingPins=portFallingPins;
				PCintPort::s_pmask=p->mask;
				PCintPort::s_changedPins=changedPins;
				#endif
				p->PCintFunc();
			}
			p=p->next;
}
</pre>
<p>According to this, while there's nothing on the datasheet that says you can't specify the trigger event on pin change interrupt, it seems the library still allows you to do that depending on the initial state of your interrupt pin. So rising edge triggering is possible if the interrupt pin is initially low then made high or falling edge triggering is possible if the interrupt pin is initially high then made low.</p>
<p>I hoped this answered your question.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Akram		</title>
		<link>https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-19093</link>

		<dc:creator><![CDATA[Akram]]></dc:creator>
		<pubDate>Sat, 02 Mar 2019 11:24:37 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2566#comment-19093</guid>

					<description><![CDATA[Great Tutorial.
Have one question. 
How to set the CHANGE, LOW, HIGH, RISING, FALLING options when using the Pin Change Interrupt?
Thanks again for this interesting tutorial.]]></description>
			<content:encoded><![CDATA[<p>Great Tutorial.<br />
Have one question.<br />
How to set the CHANGE, LOW, HIGH, RISING, FALLING options when using the Pin Change Interrupt?<br />
Thanks again for this interesting tutorial.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: HARANATH CJ		</title>
		<link>https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-17534</link>

		<dc:creator><![CDATA[HARANATH CJ]]></dc:creator>
		<pubDate>Mon, 07 Jan 2019 12:06:36 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2566#comment-17534</guid>

					<description><![CDATA[I could easily understand about interrupts]]></description>
			<content:encoded><![CDATA[<p>I could easily understand about interrupts</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Roland Pelayo		</title>
		<link>https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-9327</link>

		<dc:creator><![CDATA[Roland Pelayo]]></dc:creator>
		<pubDate>Thu, 13 Sep 2018 09:48:11 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2566#comment-9327</guid>

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

Thank you for the kind words Steve]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-9080">Steve</a>.</p>
<p>Thank you for the kind words Steve</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Roland Pelayo		</title>
		<link>https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-9325</link>

		<dc:creator><![CDATA[Roland Pelayo]]></dc:creator>
		<pubDate>Thu, 13 Sep 2018 09:47:40 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2566#comment-9325</guid>

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

Hey Mike,

Thanks for pointing that out. You are correct, it should be PCMSK1. It seems I accidentally omitted the 1 at the end.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-9313">Mike</a>.</p>
<p>Hey Mike,</p>
<p>Thanks for pointing that out. You are correct, it should be PCMSK1. It seems I accidentally omitted the 1 at the end.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike		</title>
		<link>https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-9313</link>

		<dc:creator><![CDATA[Mike]]></dc:creator>
		<pubDate>Thu, 13 Sep 2018 09:02:28 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2566#comment-9313</guid>

					<description><![CDATA[Thanks so much for this great tutorial.
Can you clear one thing for me. 
In the full sketch code I expected this line 
PCMSK = B00000001; //enable PCINT8
to be
PCMSK1 = B00000001; //enable PCINT8

What am I missing. There are 3 Pin Mask Registers, so I expected that you would have to name them explicitly.

Cheers
Mike]]></description>
			<content:encoded><![CDATA[<p>Thanks so much for this great tutorial.<br />
Can you clear one thing for me.<br />
In the full sketch code I expected this line<br />
PCMSK = B00000001; //enable PCINT8<br />
to be<br />
PCMSK1 = B00000001; //enable PCINT8</p>
<p>What am I missing. There are 3 Pin Mask Registers, so I expected that you would have to name them explicitly.</p>
<p>Cheers<br />
Mike</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steve		</title>
		<link>https://www.teachmemicro.com/arduino-interrupt-tutorial/#comment-9080</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 05:15:33 +0000</pubDate>
		<guid isPermaLink="false">https://www.teachmemicro.com/?p=2566#comment-9080</guid>

					<description><![CDATA[Fantastic simplification of interrupts.
I&#039;ve read many explanations but never really understood how to actually make them work. 
I&#039;ve read almost all of your tutorials because they are helpful and so well written.

Thanks,
Steve]]></description>
			<content:encoded><![CDATA[<p>Fantastic simplification of interrupts.<br />
I've read many explanations but never really understood how to actually make them work.<br />
I've read almost all of your tutorials because they are helpful and so well written.</p>
<p>Thanks,<br />
Steve</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 03:25:05 by W3 Total Cache
-->