<?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>MQX Software Solutions中的主题 Re: How to interface keypad with FRDM K64</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645868#M17121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even if you DON''T have external filters/protection on the row and column pins you shouldn't expect a 'row' change to IMMEDIATELY reflect as a corresponding column change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And of course the 'noisy' press-event edge means you MAY get signaled for this interrupt, but WHILE YOU ARE LOOKING the 'bouncy activation' COULD be in a subsequent 'open period' and you will be unable to detect anything.&amp;nbsp; That's a main reason we all SCAN these kinds of inputs on a timer-driven polling interval -- that also leaves you free to 'make a change' to the row pattern as you exit ONE poll interval, and allow the 'whole poll interval' for the column read-back to settle for a 'read' coming into the next interval, without 'wasting time' waiting for it.&amp;nbsp; For four rows to scan, I might do 'one piece' of the scan every 5ms, when you 'find the key' lock on to it until you get 5 stable intervals 'on', call that 'activate', and when you see 5 stable 'off' call that 'deactivate' (and return to all-rows-on to look for ANY new keypress).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2017 18:01:13 GMT</pubDate>
    <dc:creator>egoodii</dc:creator>
    <dc:date>2017-02-21T18:01:13Z</dc:date>
    <item>
      <title>How to interface keypad with FRDM K64</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645864#M17117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have to interface 4*4 button pad with FRDM K64 . Please give me some possible &amp;nbsp;solutions and &amp;nbsp;examples if you have for reference.How to implement this using interrupts in MQX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 04:53:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645864#M17117</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2017-02-17T04:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to interface keypad with FRDM K64</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645865#M17118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general, one doesn't put 'user input switches' on any kind of interrupt, as the 'edge events' are VERY messy.&amp;nbsp; One would 'poll' such things, say at 5ms intervals, and 'debounce' any sensed activity for 50ms (more for some kinds of 'resistive pill' elastomeric actuations).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 'general process' would be to have 4 'output' GPIO, and 4 'input' to scan your matrix.&amp;nbsp; Put pull-downs on the inputs (fairly low value, even down to 1K, for noise immunity).&amp;nbsp; Leave your four column-outputs driving all 'high' most of the time, and at each 'check interval' see if ANY input has been pulled-high, and in THAT case switch-over to a 'scanning' mode, where you FLOAT 3 of the 4 columns, and check your inputs again, and scan across those columns one-high-at-a-time until you find an active input.&amp;nbsp; If you see the 'same result' for 10 tick-driven-scans in a row, you call that an input-press.&amp;nbsp; When your scans 'come up empty' for 10 scans in a row, you go back to 'idle mode' with all columns driven 'high' again, and then each 'tick' again just looks for 'anything in' or just quits.&amp;nbsp; You don't mention if you are looking just for 2-key rollover, or full N-key rollover -- the latter requires diodes in the matrix, and more sophisticated scanning that looks for a continuation of multiple combinations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:34:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645865#M17118</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2017-02-17T15:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to interface keypad with FRDM K64</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645866#M17119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerKeypad.PDF" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerKeypad.PDF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Professional support for Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Findex.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/index.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Remote desktop one-on-one coaching: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fservices.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Getting started to expert videos: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fresults%3Fsearch_query%3Dutasker%2Bshorts" rel="nofollow" target="_blank"&gt;https://www.youtube.com/results?search_query=utasker+shorts&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:16:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645866#M17119</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-02-17T18:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to interface keypad with FRDM K64</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645867#M17120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Thank you all for your reply. I wrote a code using processor expert with interrupts. 4 output GPIO(rows) and 4 Input/Output GPIOs for columns.Column is initially 1. Then row is 0. On key press it comes to this interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working this is detecting the key press. but not working fine. it is not fast. keypress is not detected at the first press.&lt;/P&gt;&lt;P&gt;Code for only one column is here&lt;/P&gt;&lt;P&gt;void C1Int_OnInterrupt(LDD_TUserData *UserDataPtr)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;if(C1_GetVal() == 0)&lt;BR /&gt; { &lt;BR /&gt; R1_SetVal();&lt;BR /&gt; if(C1_GetVal() == 1)&lt;BR /&gt; update(1);&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; R2_SetVal();&lt;BR /&gt; if(C1_GetVal() == 1)&lt;BR /&gt; update(4);&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; R3_SetVal();&lt;BR /&gt; if(C1_GetVal() == 1)&lt;BR /&gt; update(7);&lt;BR /&gt; else&lt;BR /&gt; update('*');&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what am i doing wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Feb 2017 07:48:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645867#M17120</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2017-02-18T07:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to interface keypad with FRDM K64</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645868#M17121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even if you DON''T have external filters/protection on the row and column pins you shouldn't expect a 'row' change to IMMEDIATELY reflect as a corresponding column change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And of course the 'noisy' press-event edge means you MAY get signaled for this interrupt, but WHILE YOU ARE LOOKING the 'bouncy activation' COULD be in a subsequent 'open period' and you will be unable to detect anything.&amp;nbsp; That's a main reason we all SCAN these kinds of inputs on a timer-driven polling interval -- that also leaves you free to 'make a change' to the row pattern as you exit ONE poll interval, and allow the 'whole poll interval' for the column read-back to settle for a 'read' coming into the next interval, without 'wasting time' waiting for it.&amp;nbsp; For four rows to scan, I might do 'one piece' of the scan every 5ms, when you 'find the key' lock on to it until you get 5 stable intervals 'on', call that 'activate', and when you see 5 stable 'off' call that 'deactivate' (and return to all-rows-on to look for ANY new keypress).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2017 18:01:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645868#M17121</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2017-02-21T18:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to interface keypad with FRDM K64</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645869#M17122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;This is a polling code for interfacing keypad in MQX.&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt; {&lt;BR /&gt; lwgpio_set_value(&amp;amp;Column1,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Column2,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Column3,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Column4,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row1,LWGPIO_VALUE_LOW);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row2,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row3,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row4,LWGPIO_VALUE_HIGH);&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column1) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column1) == 0));&lt;BR /&gt; printf("Key pressed: 1\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column2) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column2) == 0));&lt;BR /&gt; printf("Key pressed: 2\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column3) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column3) == 0));&lt;BR /&gt; printf("Key pressed: 3\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column4) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column4) == 0));&lt;BR /&gt; printf("Key pressed: A\n");&lt;BR /&gt; }&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row1,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row2,LWGPIO_VALUE_LOW);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row3,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row4,LWGPIO_VALUE_HIGH);&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column1) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column1) == 0));&lt;BR /&gt; printf("Key pressed: 4\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column2) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column2) == 0));&lt;BR /&gt; printf("Key pressed: 5\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column3) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column3) == 0));&lt;BR /&gt; printf("Key pressed: 6\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column4) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column4) == 0));&lt;BR /&gt; printf("Key pressed: B\n");&lt;BR /&gt; }&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row1,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row2,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row3,LWGPIO_VALUE_LOW);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row4,LWGPIO_VALUE_HIGH);&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column1) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column1) == 0));&lt;BR /&gt; printf("Key pressed: 7\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column2) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column2) == 0));&lt;BR /&gt; printf("Key pressed: 8\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column3) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column3) == 0));&lt;BR /&gt; printf("Key pressed: 9\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column4) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column4) == 0));&lt;BR /&gt; printf("Key pressed: C\n");&lt;BR /&gt; }&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row1,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row2,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row3,LWGPIO_VALUE_HIGH);&lt;BR /&gt; lwgpio_set_value(&amp;amp;Row4,LWGPIO_VALUE_LOW);&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column1) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column1) == 0));&lt;BR /&gt; printf("Key pressed: *\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column2) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column2) == 0));&lt;BR /&gt; printf("Key pressed: 0\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column3) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column3) == 0));&lt;BR /&gt; printf("Key pressed: #\n");&lt;BR /&gt; }&lt;BR /&gt; if((lwgpio_get_value(&amp;amp;Column4) == 0))&lt;BR /&gt; {&lt;BR /&gt; _time_delay(10);&lt;BR /&gt; while((lwgpio_get_value(&amp;amp;Column4) == 0));&lt;BR /&gt; printf("Key pressed: D\n");&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialize rows and columns&amp;nbsp;by&amp;nbsp;&lt;/P&gt;&lt;P&gt;mentioned only one pin here.&lt;/P&gt;&lt;P&gt;#define R1 &amp;nbsp;(GPIO_PORT_C | GPIO_PIN11) &amp;nbsp;//Row 1&lt;/P&gt;&lt;P&gt;#define R1_MUX_GPIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (LWGPIO_MUX_C11_GPIO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (!lwgpio_init(&amp;amp;Row1, R1, LWGPIO_DIR_OUTPUT,&lt;BR /&gt; LWGPIO_VALUE_LOW))&lt;BR /&gt; {&lt;BR /&gt; printf("Initializing Row 1 GPIO as output failed.\n");&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; // switch pin functionality (MUX) to GPIO mode&lt;BR /&gt; lwgpio_set_functionality(&amp;amp;Row1, R1_MUX_GPIO);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;trying to generate a code for keypad using interrupts. will post it as soon i get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 10:59:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-interface-keypad-with-FRDM-K64/m-p/645869#M17122</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2017-03-07T10:59:12Z</dc:date>
    </item>
  </channel>
</rss>

