<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LPC Interrupt in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540213#M6845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by drvrh on Tue Jul 07 03:15:06 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, my first program in interrupt. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void EINT0_IRQHandler(void){
if(y &amp;lt; 5){
PotisniChar(0, y, 1, "&amp;gt;");
y++;
}else{
y = 1;
}

}

void PinInit(){
GPIOSetDir(0, 9, INPUT);
GPIOSetPull(0, 9, PULLUP);
}

void MainMenu(){
PinInit();
LPC_GPIOINT -&amp;gt; IO0IntEnF |= (1 &amp;lt;&amp;lt; 9);
NVIC_EnableIRQ(EINT0_IRQn);

}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have button on P0.9 pin, I have PULLUP resistor on VCC. And Button on GND. As you can on this right picture: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://http://www.scriptoriumdesigns.com/embedded/_images/Switch_inputs_sm.png" rel="nofollow noopener noreferrer" target="_blank"&gt;PICS&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But no working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:48:49 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:48:49Z</dc:date>
    <item>
      <title>LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540213#M6845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by drvrh on Tue Jul 07 03:15:06 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, my first program in interrupt. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void EINT0_IRQHandler(void){
if(y &amp;lt; 5){
PotisniChar(0, y, 1, "&amp;gt;");
y++;
}else{
y = 1;
}

}

void PinInit(){
GPIOSetDir(0, 9, INPUT);
GPIOSetPull(0, 9, PULLUP);
}

void MainMenu(){
PinInit();
LPC_GPIOINT -&amp;gt; IO0IntEnF |= (1 &amp;lt;&amp;lt; 9);
NVIC_EnableIRQ(EINT0_IRQn);

}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have button on P0.9 pin, I have PULLUP resistor on VCC. And Button on GND. As you can on this right picture: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://http://www.scriptoriumdesigns.com/embedded/_images/Switch_inputs_sm.png" rel="nofollow noopener noreferrer" target="_blank"&gt;PICS&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But no working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540213#M6845</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540214#M6846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by serge on Tue Jul 07 06:16:35 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;which MCU?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540214#M6846</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540215#M6847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Tue Jul 07 08:33:09 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;1.) This is not a complete program.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.) What's not working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;23.) You probably want to use the key word 'volatile'.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540215#M6847</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540216#M6848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue Jul 07 09:22:43 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: drvrh&lt;/STRONG&gt;&lt;BR /&gt;But no working.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No clearing interrupt, no working&amp;nbsp; :O &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540216#M6848</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540217#M6849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by drvrh on Wed Jul 08 00:26:17 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC1769&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now updated my code and other, but:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. I don't know how to use EINTX handler, for one button one handler or how? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. I have a problem with debouncing please let me know how debounce on my example code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the my class: &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void EINT3_IRQHandler(void){

if((LPC_GPIOINT -&amp;gt; IO0IntStatF) &amp;amp; (1 &amp;lt;&amp;lt; UPTIPKA_PIN)){
LPC_GPIOINT -&amp;gt; IO0IntClr |= (1 &amp;lt;&amp;lt; UPTIPKA_PIN);
//LCDPocisti();
//MainMenu();
flagIO1 = 1;
}
if((LPC_GPIOINT -&amp;gt; IO0IntStatF) &amp;amp; (1 &amp;lt;&amp;lt; MENUTIPKA_PIN)){
LPC_GPIOINT -&amp;gt; IO0IntClr |= (1 &amp;lt;&amp;lt; MENUTIPKA_PIN);
if(flagIO2 == 0){
LCDPocisti();
MainMenu();
}else{
ZacetniZaslon();
}
}
}
void EINT2_IRQHandler(void){
if((LPC_GPIOINT -&amp;gt; IO0IntStatF) &amp;amp; (1 &amp;lt;&amp;lt; HOLDTIPKA_PIN)){
LPC_GPIOINT -&amp;gt; IO0IntClr |= (1 &amp;lt;&amp;lt; HOLDTIPKA_PIN);
if(stHoldLogo == 0){
PotisniHoldLogo();
}else{
PotisniChar(0, 4, 1, " ");
PotisniChar(0, 5, 1, " ");
stHoldLogo = 0;
flagIO3 = 0;
}
}
}

void IOIntInit(){
LPC_GPIOINT -&amp;gt; IO0IntEnF = (1 &amp;lt;&amp;lt; UPTIPKA_PIN) | (1 &amp;lt;&amp;lt; MENUTIPKA_PIN) | (1 &amp;lt;&amp;lt; HOLDTIPKA_PIN);
NVIC_EnableIRQ(EINT3_IRQn);
NVIC_EnableIRQ(EINT2_IRQn);
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is the main program: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;int main(void) {
LCDInit();
LCDPocisti();
RTCInit(0, 0, 0, 0, 15, 4, 2015);
PinInit();
&amp;nbsp;&amp;nbsp;&amp;nbsp; IOIntInit();
&amp;nbsp;&amp;nbsp;&amp;nbsp; ZacetniZaslon();

&amp;nbsp;&amp;nbsp;&amp;nbsp; while (1) {

&amp;nbsp;&amp;nbsp;&amp;nbsp; //LCDDEMO();
&amp;nbsp;&amp;nbsp;&amp;nbsp; //LCDPocisti();
&amp;nbsp;&amp;nbsp;&amp;nbsp; //MainMenu();

&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. I have a one big problem, I work on menu project, with button MENU i go to MainMenu function in MainMenu function button UP no working. Why. Maybe because in the MainMenu function if who test flagIO1 (button UP) and not set when I entrance in function MainMenu. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my function MainMenu():&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void MainMenu(){
flagIO2 = 1;
PotisniChar(16, 0, 1, "MENU");
PotisniChar(10, 1, 1, "LANG");
PotisniChar(10, 2, 1, "TIME");
PotisniChar(10, 3, 1, "HOLD");
PotisniChar(10, 4, 1, "TIMER");
PotisniChar(10, 5, 1, "TEMP");

if(flagIO1){
if(y &amp;gt; 5){
y = 1;
}
switch (y){
case 1:{

flagIO1 = 0;
yp = y;
yp = 5;
PotisniChar(0, yp, 1, " ");
PotisniChar(0, y, 1, "&amp;gt;");
y++;
break;
}case 2:{

flagIO1 = 0;
yp = y;
yp--;
PotisniChar(0, yp, 1, " ");
PotisniChar(0, y, 1, "&amp;gt;");
y++;
break;
}case 3:{

flagIO1 = 0;
yp = y;
yp--;
PotisniChar(0, yp, 1, " ");
PotisniChar(0, y, 1, "&amp;gt;");
y++;
break;
}
case 4:{

flagIO1 = 0;
yp = y;
yp--;
PotisniChar(0, yp, 1, " ");
PotisniChar(0, y, 1, "&amp;gt;");
y++;
break;
}
case 5:{

flagIO1 = 0;
yp = y;
yp--;
PotisniChar(0, yp, 1, " ");
PotisniChar(0, y, 1, "&amp;gt;");
y++;
break;
}
case 6:{

flagIO1 = 0;
yp = y;
yp--;
PotisniChar(0, yp, 1, " ");
y++;
break;
}
default:{
yp = 0;
y = 1;
break;
}
}
}
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540217#M6849</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540218#M6850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Wed Jul 08 00:49:07 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: drvrh&lt;/STRONG&gt;&lt;BR /&gt;I have a one big problem&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One&amp;nbsp; :D &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Could be useful to post your complete code, as mentioned already. Nobody knows what flagIO1 or MENUTIPKA_PIN is...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Could be useful to read the User manual:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;External Interrupt 3 (EINT3). Note: EINT3 channel is shared with GPIO interrupts&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Could be useful to avoid incredible slow LCD functions in interrupts. You are filling your ISR with LCD functions and the main loop is empty? That's nonsense&amp;nbsp; :) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Could be useful to start with a working example for your toolchain...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540218#M6850</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540219#M6851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by drvrh on Wed Jul 08 03:22:50 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;OK I'am solve problem from before. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I have a problem with debouncing how debounce correct. Now I have create with counter who counting press buttom. And if counter == 1, then made else no made. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But no working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void EINT3_IRQHandler(void){
counter1++;
if((LPC_GPIOINT -&amp;gt; IO0IntStatF) &amp;amp; (1 &amp;lt;&amp;lt; UPTIPKA_PIN)){
//counter1++;
if(counter1 == 1){
_delay_ms(150);
LPC_GPIOINT -&amp;gt; IO0IntClr |= (1 &amp;lt;&amp;lt; UPTIPKA_PIN);
flagIO1 = 1;
Kurzor();
}else{
counter1 = 0;
}
}
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define UPTIPKA_PORT0
#define UPTIPKA_PIN9&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540219#M6851</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: LPC Interrupt</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540220#M6852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Wed Jul 08 11:50:51 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: drvrh&lt;/STRONG&gt;&lt;BR /&gt;...how debounce correct.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For sure without a delay in ISR&amp;nbsp; :O &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I prefer to use a timer to disable the interrupt a few milliseconds... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;See: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Felectronics.stackexchange.com%2Fquestions%2F165044%2Funderstanding-interrupts-and-software-button-debounce" rel="nofollow" target="_blank"&gt;http://electronics.stackexchange.com/questions/165044/understanding-interrupts-and-software-button-debounce&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Interrupt/m-p/540220#M6852</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:54Z</dc:date>
    </item>
  </channel>
</rss>

