<?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>S12 / MagniV MicrocontrollersのトピックRe: Input port MC9S12XHZ512</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Input-port-MC9S12XHZ512/m-p/350931#M10570</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to Component Library window. &lt;/P&gt;&lt;P&gt;Select Port I/O&lt;/P&gt;&lt;P&gt;Select InputPin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Component Inspector InpB1:Input pin will appear.&lt;/P&gt;&lt;P&gt;in the roll down menu for Component Inspector select pin you want to use as input: for example PP3_PWM3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the ProcessorExpert Tab of the project window you will find InpB1.c and InpB1.h (in the generated modules-&amp;gt;component modules) which says:&lt;/P&gt;&lt;P&gt;&amp;nbsp; c file says:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This method is implemented as a macro. See InpB1.h file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;making the file we can see InpB1.h in the InpB1.c file (icon on left top) which presents:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define InpB1_GetVal() ( \&lt;/P&gt;&lt;P&gt; (bool)((getReg8(PTIP) &amp;amp; 0x08U)) /* Evaluate to port raw data */ \&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I want to use it and get the value of the pin I will write into a code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x = InpB1_GetVal(); // get PP3 pin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/50656i6CA808123E23EA57/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards, Ladislav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Feb 2015 12:25:32 GMT</pubDate>
    <dc:creator>lama</dc:creator>
    <dc:date>2015-02-20T12:25:32Z</dc:date>
    <item>
      <title>Input port MC9S12XHZ512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Input-port-MC9S12XHZ512/m-p/350930#M10569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have connected two switch at PP3 and PP2 port of MC9S12XHZ512 microcontroller , I want to read both independently, Can any one provide me code for that using processor expert .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 15:06:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Input-port-MC9S12XHZ512/m-p/350930#M10569</guid>
      <dc:creator>kdn</dc:creator>
      <dc:date>2015-01-16T15:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Input port MC9S12XHZ512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Input-port-MC9S12XHZ512/m-p/350931#M10570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to Component Library window. &lt;/P&gt;&lt;P&gt;Select Port I/O&lt;/P&gt;&lt;P&gt;Select InputPin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Component Inspector InpB1:Input pin will appear.&lt;/P&gt;&lt;P&gt;in the roll down menu for Component Inspector select pin you want to use as input: for example PP3_PWM3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the ProcessorExpert Tab of the project window you will find InpB1.c and InpB1.h (in the generated modules-&amp;gt;component modules) which says:&lt;/P&gt;&lt;P&gt;&amp;nbsp; c file says:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This method is implemented as a macro. See InpB1.h file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;making the file we can see InpB1.h in the InpB1.c file (icon on left top) which presents:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define InpB1_GetVal() ( \&lt;/P&gt;&lt;P&gt; (bool)((getReg8(PTIP) &amp;amp; 0x08U)) /* Evaluate to port raw data */ \&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I want to use it and get the value of the pin I will write into a code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x = InpB1_GetVal(); // get PP3 pin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/50656i6CA808123E23EA57/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards, Ladislav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 12:25:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Input-port-MC9S12XHZ512/m-p/350931#M10570</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2015-02-20T12:25:32Z</dc:date>
    </item>
  </channel>
</rss>

