<?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 KBI Interrupt using Beestack Template in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/KBI-Interrupt-using-Beestack-Template/m-p/203408#M16812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I want to know how to implement a RISING edge KBI interrupt using the Beestack state machine. I understand how it works but I could not get it working. I think I need to change just a few things in the macro SwitchPortGet and of course setup the register KBISC for rising edge. I tried some things but with no success. And finally, just&amp;nbsp;a suggestion for Freescale: change the code and add an item in Beekit to configure the KBI interrupts for rising edges. &lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif"&gt;&lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/A&gt; Thanks in advance!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PS: I want just the switch SW3 to generate&amp;nbsp;interrupts for rising edges. The rest os the switches will be falling edges.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by DedsBee on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-03-17&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;12:51 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Mar 2008 19:46:51 GMT</pubDate>
    <dc:creator>DedsBee</dc:creator>
    <dc:date>2008-03-17T19:46:51Z</dc:date>
    <item>
      <title>KBI Interrupt using Beestack Template</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/KBI-Interrupt-using-Beestack-Template/m-p/203408#M16812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I want to know how to implement a RISING edge KBI interrupt using the Beestack state machine. I understand how it works but I could not get it working. I think I need to change just a few things in the macro SwitchPortGet and of course setup the register KBISC for rising edge. I tried some things but with no success. And finally, just&amp;nbsp;a suggestion for Freescale: change the code and add an item in Beekit to configure the KBI interrupts for rising edges. &lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif"&gt;&lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/A&gt; Thanks in advance!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PS: I want just the switch SW3 to generate&amp;nbsp;interrupts for rising edges. The rest os the switches will be falling edges.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by DedsBee on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-03-17&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;12:51 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 19:46:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/KBI-Interrupt-using-Beestack-Template/m-p/203408#M16812</guid>
      <dc:creator>DedsBee</dc:creator>
      <dc:date>2008-03-17T19:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: KBI Interrupt using Beestack Template</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/KBI-Interrupt-using-Beestack-Template/m-p/203409#M16813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;You can set the rising edges/high levels for SW3 only from code (change KBISC register, for SW3 generate&amp;nbsp;interrupts for rising edges, set KBISC=0x12 ). You can't do this change using BeeKit.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;KBI port bits 3 through 0 can detect falling edges-only or falling edges and low levels. KBI port bits 7 through 4 can be configured to detect either:&lt;BR /&gt;• Rising edges-only or rising edges and high levels (KBEDGn = 1)&lt;BR /&gt;• Falling edges-only or falling edges and low levels (KBEDGn = 0)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 21:00:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/KBI-Interrupt-using-Beestack-Template/m-p/203409#M16813</guid>
      <dc:creator>addiyi</dc:creator>
      <dc:date>2008-03-17T21:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: KBI Interrupt using Beestack Template</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/KBI-Interrupt-using-Beestack-Template/m-p/203410#M16814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi addiyi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your answer, let me try to explain&amp;nbsp;a little better what is my real problem. I know that I need to change KBISC register (=0x12) but the problem is that Beestack state machine for&amp;nbsp;KBI interrupts doesn't recognize it. See in function KeyScan (keyboard.c). When the function KeySwitchPortGet() is called, it returns a value that&amp;nbsp;indicate that no key was pressed, even&amp;nbsp;mantaining&amp;nbsp;pin PTA4&amp;nbsp;(the pin for SW3) in high level. This is because when you configure&amp;nbsp;PTA4 to generate RISING edges interrupts, the pull-down resistor is enabled and when you&amp;nbsp;aply high level in PTA4, it appears that the Beestack state machine for KBI recognize PTA4 in an "depressed" state, like the others switches (all will be at high level). So, it appears that KBI state machine really doesn't recognize that the pin is active when you configure to rising edges. The interrupt is generated but is treated like a "bounce" in a pin, even with the pin being continuous "pressed". As I said, I think I need to modify some thing in macro SwitchPortGet, but I don't know what. It's a little hard to explain, but I tried. &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt; Thank you very much!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 22:56:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/KBI-Interrupt-using-Beestack-Template/m-p/203410#M16814</guid>
      <dc:creator>DedsBee</dc:creator>
      <dc:date>2008-03-17T22:56:57Z</dc:date>
    </item>
  </channel>
</rss>

