<?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>8-bit MicrocontrollersのトピックHc908QT1 MODEK=1</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Hc908QT1-MODEK-1/m-p/684611#M22420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi when i set-up the keyboard module in level and edge the KeyF is set and cannot be clear. Even if i write 1 to ACKK. i'm using kbi0 and kbi1 as input switch pulled up. and pta4 and pta5 as output to leds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mov #$03,kbscr&lt;/P&gt;&lt;P&gt;mov #$03,kbier&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; keyf set to 1 ?&lt;/P&gt;&lt;P&gt;mov #$07,kbscr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; doesn't cleat keyf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input pin0 and pin1 are set to logic 1&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2017 20:36:20 GMT</pubDate>
    <dc:creator>lucostiguy</dc:creator>
    <dc:date>2017-07-26T20:36:20Z</dc:date>
    <item>
      <title>Hc908QT1 MODEK=1</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Hc908QT1-MODEK-1/m-p/684611#M22420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi when i set-up the keyboard module in level and edge the KeyF is set and cannot be clear. Even if i write 1 to ACKK. i'm using kbi0 and kbi1 as input switch pulled up. and pta4 and pta5 as output to leds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mov #$03,kbscr&lt;/P&gt;&lt;P&gt;mov #$03,kbier&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; keyf set to 1 ?&lt;/P&gt;&lt;P&gt;mov #$07,kbscr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; doesn't cleat keyf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input pin0 and pin1 are set to logic 1&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 20:36:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Hc908QT1-MODEK-1/m-p/684611#M22420</guid>
      <dc:creator>lucostiguy</dc:creator>
      <dc:date>2017-07-26T20:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hc908QT1 MODEK=1</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Hc908QT1-MODEK-1/m-p/684612#M22421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you certain of the part number for the device you are working with?&amp;nbsp; I don't know that version -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, for MC9S08AC60 (what I am using at the moment)&amp;nbsp; when keyboard interrupt is generated, in my interrupt service routine I do:&lt;/P&gt;&lt;P&gt;KBISC = KBISC_KBACK;&amp;nbsp;&amp;nbsp; //&amp;nbsp; 0x04&amp;nbsp;&amp;nbsp; Acknowledge kb interrupt, clear KBIMOD so it is edge only, clear KBIE so no new interrupt is generated for now&lt;/P&gt;&lt;P&gt;.... do other things..&lt;/P&gt;&lt;P&gt;KBISC = KBISC_KBIE | KBISC_KBIMOD; // RE enable interrupt generation for active low and falling edge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is important to note, if you are using falling edge AND low levels to trigger interrupt like I am doing, is that the KBF flag will continuously be asserted if the input pin is still remaining in the low level after the falling edge occurs.&amp;nbsp; So, when I write with the KBISC_KBACK = 1, I make KBIMOD = 0 so that the KBF bit should clear (or at least another interrupt will not be generated because the KB Controller will be in edge only, not edge and level move).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am ready to leave the interupt routine I write the KBISC_KBIE | KBISC_KBIMOD bits = 1 to restore keyboard interupts to edge and level function.&lt;/P&gt;&lt;P&gt;So, depending on KBEDG(bits 7- 4) bits and KBIMOD (bit 0) if any of the enabled inputs in KBIPE register are remaining in the activated level/state, the KBIF flag will continuously be set=1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 17:27:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Hc908QT1-MODEK-1/m-p/684612#M22421</guid>
      <dc:creator>mfugere</dc:creator>
      <dc:date>2017-08-04T17:27:27Z</dc:date>
    </item>
  </channel>
</rss>

