<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Using Pin Change Interrupt (PCINT) for wakeup]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">Can I use the Pinchange Interrupts (PCINT), which are available for every Pin, to wakeup the Arduino/MySensors module?</p>
<p dir="auto">I think I read in a Sketch which uses Sleep Mode that only the "real" 2 Interrupt pins can be used.<br />
Is this true? I also think that I saw a sketch somewhere where someone used the pinchange Interrupts to wake up (but it was not in conjunction with MySensors I think).</p>
<p dir="auto">Anyway has anybody tried to use PinChange Interrupts or can give some more Information on that topic?</p>
<p dir="auto">Tanks in advance<br />
Dirk_H</p>
]]></description><link>https://forum.mysensors.org/topic/926/using-pin-change-interrupt-pcint-for-wakeup</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 17:03:49 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/926.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Feb 2015 11:55:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using Pin Change Interrupt (PCINT) for wakeup on Sat, 11 Apr 2015 18:37:56 GMT]]></title><description><![CDATA[<p dir="auto">Or use development branch where this dependency has been removed from the library.</p>
]]></description><link>https://forum.mysensors.org/post/12615</link><guid isPermaLink="true">https://forum.mysensors.org/post/12615</guid><dc:creator><![CDATA[hek]]></dc:creator><pubDate>Sat, 11 Apr 2015 18:37:56 GMT</pubDate></item><item><title><![CDATA[Reply to Using Pin Change Interrupt (PCINT) for wakeup on Sat, 11 Apr 2015 18:08:37 GMT]]></title><description><![CDATA[<p dir="auto">Hi.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/dirk_h" aria-label="Profile: Dirk_H">@<bdi>Dirk_H</bdi></a>   I should try before. I renamed Mygateway.cpp and it works well now.<br />
Thx for your help.</p>
]]></description><link>https://forum.mysensors.org/post/12611</link><guid isPermaLink="true">https://forum.mysensors.org/post/12611</guid><dc:creator><![CDATA[scalz]]></dc:creator><pubDate>Sat, 11 Apr 2015 18:08:37 GMT</pubDate></item><item><title><![CDATA[Reply to Using Pin Change Interrupt (PCINT) for wakeup on Sat, 11 Apr 2015 15:41:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scalz" aria-label="Profile: scalz">@<bdi>scalz</bdi></a><br />
Hi, regarding you first qeustion I'll copy somehting from my Project Documentation from the Wall Remote below.<br />
I dont really understand your second question. If you enable the interrupts on pin5 and pin6, the interrupt will always be triggered if the pin changes its voltage level... It can obviously not discover what caused the voltage level only that it did.. But I fear I do not understand exactly what you mean..</p>
<p dir="auto">To wake up the controller from sleep mode, which is used to save power, the PinChange Interrupts<br />
have been used, but Arduino compiles also the MyGateway.cpp where PinChange interrupts also<br />
have been used. Because every Interrupt Vector is only allowed to be once in the compiled code this<br />
is a problem.<br />
However the workaround for this is to rename the “MyGateway.cpp” from the “{Arduino<br />
Sketchbooks}\libraries\MySensors” into something the compiler does not try to compile e.g.<br />
“MyGateway.cpp.nolib”. Remind to undo this renaming if you want to compile a MySensors<br />
Gateway!<br />
You find the {Arduino Sketchbooks} location by “File-Prefernces” in the Arduino IDE.<br />
When the files have been renamed it is possible to compile the WallRemote sketch. When<br />
everything is connected like shown above you can also download the sketch to the hardware. For<br />
the download the correct Board and COM port must be selected. Make sure the<br />
“Tools-&gt;Board-&gt;Arduino Pro or ProMini (3.3V, 3.6864 MHz) w/ ATmega328” is selected. This<br />
board has been added earlier to the Arduino environment in section 2.7.</p>
]]></description><link>https://forum.mysensors.org/post/12606</link><guid isPermaLink="true">https://forum.mysensors.org/post/12606</guid><dc:creator><![CDATA[Dirk_H]]></dc:creator><pubDate>Sat, 11 Apr 2015 15:41:53 GMT</pubDate></item><item><title><![CDATA[Reply to Using Pin Change Interrupt (PCINT) for wakeup on Wed, 08 Apr 2015 08:30:56 GMT]]></title><description><![CDATA[<p dir="auto">Hi.<br />
I am trying to use pin change interrupt. It does not compile with the master branch but it compiles well with the dev branch (maybe cleanings have been done in the dev branch).<br />
The compile error is about the PCINT2_vect. What can I change in the master branch to fix my problem. I think it is related to pinchangeint.h<br />
I have another question related to change interrupt.<br />
If i have an interrupt configured on d5 or d6 in the mask for example. And a sensor connected on pin of the same mask but with no interruption on its pin (a temp sensor for example).<br />
Does the sensor will trigger? Or it will use the mask rightly?</p>
<p dir="auto">I hope I am clear in my explanation.</p>
<p dir="auto">Here is the simple piece of code I added in my node:</p>
<pre><code>// Problem  here
ISR(PCINT2_vect) {
  Serial.print("Interruption : ON");
}
In setup() I add this :
PCMSK2 = PCMSK2 | B00010000;
PCIFR = PCIFR | B00000100;
PCICR = PCICR | B00000100;

MySensors\MyGateway.cpp.o: In function `__vector_5':
C:\Users\Pascal\Documents\Arduino\libraries\MySensors\utility/PinChangeInt.h:583: multiple definition of `__vector_5'
TempHumidOnMotion.cpp.o:/Arduino/TempHumidOnMotion.ino:73: first defined here
collect2: error: ld returned 1 exit status
Erreur lors de la compilation.</code></pre>
]]></description><link>https://forum.mysensors.org/post/12522</link><guid isPermaLink="true">https://forum.mysensors.org/post/12522</guid><dc:creator><![CDATA[scalz]]></dc:creator><pubDate>Wed, 08 Apr 2015 08:30:56 GMT</pubDate></item><item><title><![CDATA[Reply to Using Pin Change Interrupt (PCINT) for wakeup on Tue, 03 Feb 2015 12:53:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dirk_h" aria-label="Profile: Dirk_H">@<bdi>Dirk_H</bdi></a> sure, you can use this interrupt on any pin.</p>
<p dir="auto">It is not a standard arduino future but I'm sure you can find someone else library for this.<br />
I personally did all needed programming just by reading atmel's datasheet, It is very simple to do it without any library,<br />
If you will need help this way just let me to know<br />
See register description page 56 <a href="http://www.atmel.com/images/atmel-7810-automotive-microcontrollers-atmega328p_datasheet.pdf#56" rel="nofollow ugc">http://www.atmel.com/images/atmel-7810-automotive-microcontrollers-atmega328p_datasheet.pdf#56</a></p>
]]></description><link>https://forum.mysensors.org/post/9673</link><guid isPermaLink="true">https://forum.mysensors.org/post/9673</guid><dc:creator><![CDATA[axillent]]></dc:creator><pubDate>Tue, 03 Feb 2015 12:53:10 GMT</pubDate></item></channel></rss>