<?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 board m52233demo problem with pins in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/board-m52233demo-problem-with-pins/m-p/173597#M6606</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey how can I change that some pins are output and some pins are input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want TIN0, TIN1, TIN2, TIN3 and IRQ7 set as input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I want AN0, AN1, AN2, AN3, AN4, AN5, AN6 and AN7 set as output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and how do I assigned a name for these pins by example TIN0 ==&amp;gt; switch 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2009 13:31:37 GMT</pubDate>
    <dc:creator>jonasb</dc:creator>
    <dc:date>2009-04-20T13:31:37Z</dc:date>
    <item>
      <title>board m52233demo problem with pins</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/board-m52233demo-problem-with-pins/m-p/173597#M6606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey how can I change that some pins are output and some pins are input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want TIN0, TIN1, TIN2, TIN3 and IRQ7 set as input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I want AN0, AN1, AN2, AN3, AN4, AN5, AN6 and AN7 set as output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and how do I assigned a name for these pins by example TIN0 ==&amp;gt; switch 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 13:31:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/board-m52233demo-problem-with-pins/m-p/173597#M6606</guid>
      <dc:creator>jonasb</dc:creator>
      <dc:date>2009-04-20T13:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: board m52233demo problem with pins</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/board-m52233demo-problem-with-pins/m-p/173598#M6607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most pins default to GPIO input with pull up resistor (around 25k). This means that &lt;STRONG&gt;TIN0..TIN3&lt;/STRONG&gt; don't need to be further configured to be used as input - simply read value from the &lt;STRONG&gt;SETTC&lt;/STRONG&gt; register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The IRQ inputs are an exception since they default to IRQ and not GPIO. To set to GPIO clear the bits &lt;STRONG&gt;0xc000&lt;/STRONG&gt; in &lt;STRONG&gt;PNQPAR&lt;/STRONG&gt;. This is then an input and can be read as bit &lt;STRONG&gt;0x80&lt;/STRONG&gt; in the &lt;STRONG&gt;SETNQ&lt;/STRONG&gt; register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To set the AN port to all outputs write &lt;STRONG&gt;0xff&lt;/STRONG&gt; to the data direction register &lt;STRONG&gt;DDRAN&lt;/STRONG&gt;. Then control their values by writing to the &lt;STRONG&gt;PORTAN&lt;/STRONG&gt; register. [Alternatively to sets bit use &lt;STRONG&gt;SETAN&lt;/STRONG&gt;, with a '1' at the bit(s) to be set, alternatively to clear bits use &lt;STRONG&gt;CLRAN&lt;/STRONG&gt;, with '0' at the bits(s) to be cleared].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To read from &lt;STRONG&gt;TIN0&lt;/STRONG&gt; with the name &lt;STRONG&gt;SWITCH1&lt;/STRONG&gt; use a define&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#define SWITCH1 0x01&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;switch_state = ((SWITCH1 &amp;amp; SETTC) != 0); // 1 when '1' and 0 when '0'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please read chapter 14 of the M52235 user's manual for full details about using GPIOs.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.uTasker.com" rel="nofollow" target="_blank"&gt;www.uTasker.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "&lt;EM&gt;Embedding it better...&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 17:57:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/board-m52233demo-problem-with-pins/m-p/173598#M6607</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2009-04-20T17:57:36Z</dc:date>
    </item>
  </channel>
</rss>

